t3-code-android-nightly/.repos/alchemy-effect/examples/cloudflare-website-sveltekit
Julius Marminge 6f9cea00ae
chore(refs): sync Effect and Alchemy references to 4.0.1 and beta.80 (#16170)
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-05 13:22:30 -07:00
..
src chore(refs): sync Effect and Alchemy references to 4.0.1 and beta.80 (#16170) 2026-10-05 13:22:30 -07:00
static 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 Alchemy reference to beta.76 (#10654) 2026-09-07 21:54:45 -07:00
package.json chore(refs): sync Effect and Alchemy references to 4.0.1 and beta.80 (#16170) 2026-10-05 13:22:30 -07:00
README.md chore(refs): sync Alchemy reference to beta.76 (#10654) 2026-09-07 21:54:45 -07:00
tsconfig.json chore(refs): sync Effect and Alchemy references to 4.0.1 and beta.80 (#16170) 2026-10-05 13:22:30 -07:00
vite.config.ts chore(refs): sync Alchemy reference to beta.76 (#10654) 2026-09-07 21:54:45 -07:00

Cloudflare Website: SvelteKit

Deploys a SvelteKit app to Cloudflare Workers with Cloudflare.Website.SvelteKit — no svelte.config.js, no @sveltejs/adapter-cloudflare, no Wrangler.

The resource builds the app with SvelteKit's own Vite pipeline and a wrangler-free in-memory Cloudflare adapter, re-bundles the server output for workerd, and deploys client assets + prerendered pages as Worker static assets. Values passed via env are exposed to server routes through platform.env.

const site = yield* Cloudflare.Website.SvelteKit("SvelteKitSite", {
  env: {
    GREETING: "Hello from SvelteKit on Cloudflare!",
  },
});

Commands

bun alchemy deploy   # build + deploy
bun alchemy dev      # SvelteKit's Vite dev server (Node SSR, HMR)
bun alchemy destroy  # tear down

Notes

  • @alchemy.run/frontend-frameworks must be installed in the project — the Worker's source provider is loaded from its /sveltekit export at deploy time.
  • Unchanged projects skip the build and deploy entirely (the project tree is content-hashed, respecting .gitignore).
  • In alchemy dev, platform.env carries the Worker's real Cloudflare bindings (KV, R2, D1, ...) served by the cloudflare-runtime platform proxy, with literal env values (strings and secrets) overlaid.