Svelte deployment guidance. Use for adapters, Vite config, pnpm setup, library authoring, PWA, or production builds.
pnpm 10+: Add prepare script (postinstall disabled by default):
{
"scripts": {
"prepare": "svelte-kit sync"
}
}
Vite 7: Update both packages together:
pnpm add -D vite@7 @sveltejs/vite-plugin-svelte@6
# Static site
pnpm add -D @sveltejs/adapter-static
# Node server
pnpm add -D @sveltejs/adapter-node
# Cloudflare
pnpm add -D @sveltejs/adapter-cloudflare
Transfer-Encoding: chunked (breaks streaming)svelte in keywords AND peerDependencieskit.output.bundleStrategy: 'single'