Deploying SvelteKit to Cloudflare Pages

Published at Oct 20, 2024

#sveltekit#svelte

Configuring SvelteKit to use the Cloudflare adapter.

Using SvelteKit’s already provided adapters in the npm package repository, we can configure Vite to build in many different ways.

Here, we are going to use @sveltejs/adapter-cloudflare to output a static site with the SvelteKit API on an integrated Worker.

Configuration

wrangler.toml
name = "sveltekit-markdown-rdmusic"
pages_build_output_dir = ".svelte-kit/cloudflare"

Deploying

You can simply run:

wrangler deploy

or

wrangler pages deploy

wee

rdmusic © 2025