Frontend frameworks
Alchemy deploys frontends to Cloudflare with two resources:
Cloudflare.Website.Vite for anything built by Vite, and
Cloudflare.Website.StaticSite for anything built by any other
command.
Cloudflare.Website.Vite
Section titled “Cloudflare.Website.Vite”const site = yield* Cloudflare.Website.Vite("Website");Cloudflare.Website.Vite deploys any pure-Vite app — it runs a
programmatic vite build of your project with the Cloudflare plugin
appended to the plugins your own vite.config.ts declares, then
uploads the client assets (and server bundle, if the build produces
one) as a Worker. No main entrypoint, no build command, no output
directory, no Wrangler config. Whatever framework plugin drives your
Vite build — TanStack Start, React Router, Vue, SolidStart — rides
along unchanged.
Cloudflare.Website.StaticSite
Section titled “Cloudflare.Website.StaticSite”const site = yield* Cloudflare.Website.StaticSite("Website", { command: "zola build", outdir: "public",});Cloudflare.Website.StaticSite deploys any directory produced by
any build command — it runs the command as a shell process,
content-hashes the output directory, and serves it as Worker static
assets. The framework (or lack of one) doesn’t matter: if a command
produces a directory of files, StaticSite deploys it.
Both resources are thin wrappers over a
Worker, so everything a Worker
supports applies to both: domain, env bindings, compatibility
flags, and a custom main entrypoint in front of the assets.
What’s supported
Section titled “What’s supported”| Framework | Resource | Status | Guide |
|---|---|---|---|
| React / Vite SPA | Vite | Supported | Vite SPA |
| TanStack Start (React & Solid) | Vite | Supported | TanStack Start |
| React Router (incl. RSC) | Vite | Supported | React Router |
| Vue | Vite | Supported | Vue |
| SolidStart / SolidJS SSR | Vite | Supported | SolidStart |
| Astro | StaticSite (static output) | Vite support is a TODO | Astro |
| Nuxt | — | Not yet supported | Nuxt |
| Zola, Hugo, or any static generator | StaticSite | Supported | Static sites |
Every “Supported” row is backed by a checked-in example or a live deploy test in the Alchemy repository — plain Vite SPA deploys are live-tested with a vanilla fixture, and React itself is exercised via the TanStack Start example. The last row is deliberately open-ended: StaticSite runs any build command that produces a directory, so any static generator works the same way — Zola is the one exercised as an example.
How to choose
Section titled “How to choose”The criterion is literal: Cloudflare.Website.Vite calls
vite.createBuilder({ root: rootDir, plugins: [cloudflare(...), ...] })
on your project root and runs buildApp() — nothing else.
If your entire app is built by vite build — the framework is a
plugin declared in vite.config.ts (tanstackStart(), viteReact(),
@vitejs/plugin-vue, solidStart()) — use Vite. If the framework
drives its own CLI build (astro build, nuxi build) or isn’t
JavaScript at all (Zola, Hugo), that build never enters Vite’s
builder, so use StaticSite on the build output instead. See
what “pure Vite” means
for the full picture.
Where next
Section titled “Where next”- The Vite resource — build model, env inlining, runtime bindings, dev mode.
- The StaticSite resource — build commands, custom Workers in front of assets, framework-native dev servers.
- Framework guides: Vite SPA, TanStack Start, React Router, Vue, SolidStart, Astro, Nuxt.