Adapters
Edit this page on GitHubBefore you can deploy your SvelteKit app, you need to adapt it for your deployment target. Adapters are small plugins that take the built app as input and generate output for deployment.
Official adapters exist for a variety of platforms — these are documented on the following pages:
@sveltejs/adapter-cloudflarefor Cloudflare Pages@sveltejs/adapter-cloudflare-workersfor Cloudflare Workers@sveltejs/adapter-netlifyfor Netlify@sveltejs/adapter-nodefor Node servers@sveltejs/adapter-staticfor static site generation (SSG)@sveltejs/adapter-vercelfor Vercel
Additional community-provided adapters exist for other platforms.
Using adapterspermalink
Your adapter is specified in svelte.config.js:
svelte.config.js
tsimportadapter from 'svelte-adapter-foo';constconfig = {kit : {adapter :adapter ({// adapter options go here})}};export defaultconfig ;
Platform-specific contextpermalink
Some adapters may have access to additional information about the request. For example, Cloudflare Workers can access an env object containing KV namespaces etc. This can be passed to the RequestEvent used in hooks and server routes as the platform property — consult each adapter's documentation to learn more.
previous
Building your app