Skip to content

Migrate from Next.js to TanStack Start with Cloudflare Workers#34

Open
ClayMav wants to merge 1 commit intomainfrom
claude/migrate-tanstack-cloudflare-iPlMx
Open

Migrate from Next.js to TanStack Start with Cloudflare Workers#34
ClayMav wants to merge 1 commit intomainfrom
claude/migrate-tanstack-cloudflare-iPlMx

Conversation

@ClayMav
Copy link
Copy Markdown
Owner

@ClayMav ClayMav commented Apr 5, 2026

  • Replace Next.js with @tanstack/react-start + @tanstack/react-router
  • Swap Vercel/vinxi build for Vite 7 + @cloudflare/vite-plugin
  • Convert app/layout.tsx + app/page.tsx to TanStack Start file routes:
    app/routes/__root.tsx (root layout with HeadContent/Scripts/Outlet)
    app/routes/index.tsx (home page)
  • Replace next/image with plain tags throughout
  • Remove "use client" directive (not needed outside Next.js)
  • Add app/router.tsx (getRouter factory), app/client.tsx (hydration entry)
  • Add wrangler.jsonc targeting @tanstack/react-start/server-entry
  • Rename postcss.config.js → .cjs, .eslintrc.js → .cjs (ESM project)
  • Update tsconfig.json for Vite (remove Next.js plugin)
  • Update .gitignore for Vite/Cloudflare artifacts

Deploy: yarn build && wrangler deploy --config dist/server/wrangler.json

https://claude.ai/code/session_014c9hSkgoFJadAvpV9bFbJ7

- Replace Next.js with @tanstack/react-start + @tanstack/react-router
- Swap Vercel/vinxi build for Vite 7 + @cloudflare/vite-plugin
- Convert app/layout.tsx + app/page.tsx to TanStack Start file routes:
    app/routes/__root.tsx  (root layout with HeadContent/Scripts/Outlet)
    app/routes/index.tsx   (home page)
- Replace next/image with plain <img> tags throughout
- Remove "use client" directive (not needed outside Next.js)
- Add app/router.tsx (getRouter factory), app/client.tsx (hydration entry)
- Add wrangler.jsonc targeting @tanstack/react-start/server-entry
- Rename postcss.config.js → .cjs, .eslintrc.js → .cjs (ESM project)
- Update tsconfig.json for Vite (remove Next.js plugin)
- Update .gitignore for Vite/Cloudflare artifacts

Deploy: yarn build && wrangler deploy --config dist/server/wrangler.json

https://claude.ai/code/session_014c9hSkgoFJadAvpV9bFbJ7
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
clay-sh Error Error Apr 5, 2026 4:07pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants