The best way to control Claude Code, Codex and more from any computer or phone

main
mdx 118 lines 5.62 KB
Raw
1 ---
2 title: Frontend frameworks
3 description: Deploy Vite, Foldkit, Astro, Next.js, vinext, Nuxt, SvelteKit, Waku, or any static build to Cloudflare Workers with first-class Website resources.
4 sidebar:
5 label: Overview
6 order: 1
7 ---
8
9 Alchemy deploys frontends to Cloudflare with a family of
10 `Cloudflare.Website` resources. Each one builds your project
11 programmatically and deploys it as a Worker — server bundle plus
12 static assets — with no Cloudflare-specific configuration: no
13 `wrangler.json`, no adapter setup. Your framework's own config file
14 (`vite.config.ts`, `astro.config.*`, `nuxt.config.ts`, ...) loads
15 natively; Alchemy layers its Cloudflare integration on top.
16
17 - [`Vite`](/cloudflare/frontend/vite) — any pure-Vite app: SPAs and
18 Vite-plugin frameworks like TanStack Start, React Router, Vue, and
19 SolidStart; your `vite.config.ts` loads natively.
20 - [`Foldkit`](/cloudflare/frontend/foldkit) — Foldkit apps; one
21 `vite build` emits the client bundle and, for a server-rendered or
22 prerendered app, the fetch handler that becomes the Worker.
23 - [`Astro`](/cloudflare/frontend/astro) — Astro sites, server-rendered
24 or fully static, with an auto-provisioned session KV namespace;
25 your `astro.config.*` loads natively.
26 - [`Nextjs`](/cloudflare/frontend/nextjs) — Next.js apps built through
27 the OpenNext pipeline, with writable ISR on KV; your `next.config.*`
28 is honored as-is.
29 - [`Vinext`](/cloudflare/frontend/vinext) — vinext (Next.js API on Vite)
30 apps, with KV-backed ISR; your `vite.config.ts` loads natively.
31 - [`Nuxt`](/cloudflare/frontend/nuxt) — Nuxt apps built through
32 nitro's `cloudflare_module` preset; your `nuxt.config.ts` loads
33 natively.
34 - [`SvelteKit`](/cloudflare/frontend/sveltekit) — SvelteKit apps with
35 a wrangler-free in-memory Cloudflare adapter; your `vite.config.ts`
36 loads natively.
37 - [`Waku`](/cloudflare/frontend/waku) — Waku (React Server
38 Components) apps.
39 - [`Octane`](/cloudflare/frontend/octane) — OctaneJS fullstack apps
40 built for Workers with native Octane and Vite configuration; no hosting
41 adapter required.
42 - [`StaticSite`](/cloudflare/frontend/static-site) — any build
43 command's output directory, for static generators like Zola and
44 Hugo.
45
46 Every resource returns a plain `Worker`, so everything a Worker
47 supports applies: `domain`, `env` bindings (KV, R2, Durable Objects,
48 secrets), `compatibility` flags, and asset routing config. All builds
49 are memoized by content-hashing the input files — an unchanged
50 project skips the build and deploy entirely.
51
52 ## What's supported
53
54 | Framework | Resource | Guide |
55 | --- | --- | --- |
56 | React / Vite SPA | `Vite` | [Vite SPA](/cloudflare/frontend/vite-spa) |
57 | TanStack Start (React & Solid) | `Vite` | [TanStack Start](/cloudflare/frontend/tanstack-start) |
58 | React Router (incl. RSC) | `Vite` | [React Router](/cloudflare/frontend/react-router) |
59 | Vue | `Vite` | [Vue](/cloudflare/frontend/vue) |
60 | Foldkit | `Foldkit` | [Foldkit](/cloudflare/frontend/foldkit) |
61 | SolidStart / SolidJS SSR | `Vite` | [SolidStart](/cloudflare/frontend/solidstart) |
62 | Astro | `Astro` | [Astro](/cloudflare/frontend/astro) |
63 | Next.js | `Nextjs` | [Next.js](/cloudflare/frontend/nextjs) |
64 | vinext | `Vinext` | [vinext](/cloudflare/frontend/vinext) |
65 | Nuxt | `Nuxt` | [Nuxt](/cloudflare/frontend/nuxt) |
66 | SvelteKit | `SvelteKit` | [SvelteKit](/cloudflare/frontend/sveltekit) |
67 | Waku | `Waku` | [Waku](/cloudflare/frontend/waku) |
68 | OctaneJS (fullstack) | `Octane` | [Octane](/cloudflare/frontend/octane) |
69 | OctaneJS (SPA) | `Vite` | [Octane](/cloudflare/frontend/octane#octane-spas-use-vite-instead) |
70 | Zola, Hugo, or any static generator | `StaticSite` | [Static sites](/cloudflare/frontend/static-site) |
71
72 Every row is backed by a checked-in example or a live deploy test in
73 the Alchemy repository. The last row is deliberately open-ended:
74 StaticSite runs any build command that produces a directory, so any
75 static generator works the same way.
76
77 ## How to choose
78
79 Use the resource named after your framework. `Astro`, `Nextjs`,
80 `Vinext`, `Nuxt`, `SvelteKit`, `Waku`, and `Octane` each drive their
81 framework's own programmatic build and know its output layout, config
82 surface, and dev server.
83
84 Use `Vite` when the framework is a plugin in your `vite.config.ts`
85 and a single `vite build` produces the whole app — TanStack Start,
86 React Router, Vue, SolidStart, or a plain SPA. See
87 [what "pure Vite" means](/cloudflare/frontend/vite#what-pure-vite-means).
88
89 Use `Foldkit` for a Foldkit app. It is `Vite` with Foldkit's
90 defaults: one `vite build`, and asset routing derived from what that
91 build wrote down, because the same project can ship client-only,
92 prerendered, server-rendered, or hybrid.
93
94 Use `StaticSite` when the build is an arbitrary shell command that
95 emits a directory of files — Zola, Hugo, or any other generator
96 without a dedicated resource.
97
98 ## Where next
99
100 - [The Vite resource](/cloudflare/frontend/vite) — build model, env
101 inlining, runtime bindings, dev mode.
102 - [The StaticSite resource](/cloudflare/frontend/static-site) — build
103 commands, custom Workers in front of assets, framework-native dev
104 servers.
105 - Framework guides:
106 [Vite SPA](/cloudflare/frontend/vite-spa),
107 [TanStack Start](/cloudflare/frontend/tanstack-start),
108 [React Router](/cloudflare/frontend/react-router),
109 [Vue](/cloudflare/frontend/vue),
110 [Foldkit](/cloudflare/frontend/foldkit),
111 [SolidStart](/cloudflare/frontend/solidstart),
112 [Astro](/cloudflare/frontend/astro),
113 [Next.js](/cloudflare/frontend/nextjs),
114 [vinext](/cloudflare/frontend/vinext),
115 [Nuxt](/cloudflare/frontend/nuxt),
116 [SvelteKit](/cloudflare/frontend/sveltekit),
117 [Waku](/cloudflare/frontend/waku),
118 [Octane](/cloudflare/frontend/octane).