t3-code-android-nightly/.repos/alchemy-effect/examples/cloudflare-website-react-router
Julius Marminge e3c85ead63
chore(refs): sync Effect and Alchemy references to rc.115 and beta.78 (#12327)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-09-17 23:21:25 -07:00
..
app chore(refs): sync Effect and Alchemy references to rc.115 and beta.78 (#12327) 2026-09-17 23:21:25 -07:00
public chore(refs): sync Alchemy reference to beta.76 (#10654) 2026-09-07 21:54:45 -07:00
react-router-vite chore(refs): sync Alchemy reference to beta.76 (#10654) 2026-09-07 21:54:45 -07:00
test chore(refs): sync Effect and Alchemy references to rc.115 and beta.78 (#12327) 2026-09-17 23:21:25 -07:00
.gitignore chore(refs): sync Alchemy reference to beta.76 (#10654) 2026-09-07 21:54:45 -07:00
alchemy.run.ts chore(refs): sync Effect and Alchemy references to rc.115 and beta.78 (#12327) 2026-09-17 23:21:25 -07:00
package.json chore(refs): sync Effect and Alchemy references to rc.115 and beta.78 (#12327) 2026-09-17 23:21:25 -07:00
README.md chore(refs): sync Effect and Alchemy references to rc.115 and beta.78 (#12327) 2026-09-17 23:21:25 -07:00
tsconfig.json chore(refs): sync Alchemy reference to beta.76 (#10654) 2026-09-07 21:54:45 -07:00
vite.config.ts chore(refs): sync Alchemy reference to beta.76 (#10654) 2026-09-07 21:54:45 -07:00

Cloudflare Website: React Router

Deploys a React Router v7 app — in React Server Components mode — to Cloudflare Workers with Cloudflare.Website.Vite. No Wrangler configuration and no manual entrypoint: the RSC build emits two server environments (rsc and ssr), and viteEnvironments in alchemy.run.ts tells Alchemy how they assemble into one Worker.

  • app/routes/home.tsx is a server component rendered in the Worker on every request; it reads the GREETING value declared in alchemy.run.ts from process.env (populated by date-default Node.js compatibility flag).
  • app/components/Card.tsx is a React component styled with Tailwind utilities (wired through @tailwindcss/vite in vite.config.ts).
  • react-router-vite/ holds one entry module per Vite environment — the browser bundle, the SSR renderer, and the Worker handler.
  • Everything under public/ deploys as static assets.

Deploy

bun run deploy

Unchanged sources skip the Vite build entirely on subsequent deploys — the input files are content-hashed (scoped by memo.include).

Destroy

bun run destroy