sveltekit-adapter
SvelteKit adapters allow you to deploy your site to numerous platforms. This add-on allows you to configure officially provided SvelteKit adapters, but a number of community-provided adapters are also available.
Usage
npx sv add sveltekit-adapterWhat you get
- the chosen SvelteKit adapter installed and configured in your
svelte.config.js
Options
adapter
Which SvelteKit adapter to use:
auto—@sveltejs/adapter-autoautomatically chooses the proper adapter to use, but is less configurablenode—@sveltejs/adapter-nodegenerates a standalone Node serverstatic—@sveltejs/adapter-staticallows you to use SvelteKit as a static site generator (SSG)vercel—@sveltejs/adapter-vercelallows you to deploy to Vercelcloudflare—@sveltejs/adapter-cloudflareallows you to deploy to Cloudflarenetlify—@sveltejs/adapter-netlifyallows you to deploy to Netlify
npx sv add sveltekit-adapter="adapter:node"cloudflare target
Whether to deploy to Cloudflare Workers or Pages. Only available for cloudflare adapter.
npx sv add sveltekit-adapter="adapter:cloudflare+cfTarget:workers"Workers is the recommended way to deploy to Cloudflare. Pages is legacy: it no longer receives new features from Cloudflare and @sveltejs/adapter-cloudflare v9 does not support it. Choosing Pages warns and pins the adapter to v8 (the last major that supports Pages) — including rolling back a v9 install. See Cloudflare’s Pages → Workers migration guide.
Edit this page on GitHub llms.txt
previous next