Svelte 5 Cloudflare Pages TypeScript

Deploy SvelteKit on Cloudflare Pages

A premium, ready-to-deploy template combining the reactivity of Svelte 5 and the raw speed of Cloudflare's global edge network.

Built-in Features

Ultra Fast Execution

Fully compatible with Cloudflare Workers' v8 runtime. Your app runs in milliseconds directly from Cloudflare's nearest edge location.

Cloudflare Bindings

Access native KV namespaces, D1 SQL databases, R2 Object Storage, and Durable Objects directly from SvelteKit endpoints.

Full-Stack TypeScript

End-to-end type safety from your edge server routes and loaders down to your frontend pages and Svelte components.

Local Development & Deployment

Follow these commands to build, preview, and deploy your new SvelteKit project.

1

Run the Dev Server

Start SvelteKit locally for standard development with hot module replacement (HMR):

npm run dev
2

Build the App

Generate optimized static assets and Cloudflare Worker compatible endpoints:

npm run build
3

Wrangler Local Preview

Emulate the Cloudflare Pages environment locally with Wrangler (simulates bindings and edge behaviour):

npm run preview
4

Deploy to Cloudflare Pages

Deploy the compiled output directly using the Wrangler CLI: (make sure you run npx wrangler login first)

npx wrangler pages deploy .svelte-kit/cloudflare --project-name propubliko