Official adapters
SvelteKit provides official adapters for a variety of platforms:@sveltejs/adapter-auto- Automatically detects your environment@sveltejs/adapter-cloudflare- For Cloudflare Workers and Cloudflare Pages@sveltejs/adapter-netlify- For Netlify@sveltejs/adapter-node- For Node servers@sveltejs/adapter-static- For static site generation (SSG)@sveltejs/adapter-vercel- For Vercel
Using adapters
Your adapter is specified insvelte.config.js:
Platform-specific context
Some adapters may have access to additional information about the request. For example, Cloudflare Workers can access anenv object containing KV namespaces and other bindings.
This information is passed to the RequestEvent used in hooks (see advanced/hooks) and server routes as the platform property:
Consult each adapter’s documentation to learn what platform-specific context is available.
Adapter capabilities
Different adapters support different features:| Feature | Description |
|---|---|
| Server-side rendering | Dynamic rendering of pages on each request |
| Prerendering | Static HTML generation at build time |
| Edge functions | Code running at the edge, closer to users |
| Streaming | Streaming responses for better performance |
| Read API | Access to static assets via read from $app/server |
Community adapters
In addition to the official adapters, the community has created adapters for other platforms. You can find community adapters on npm by searching for “sveltekit-adapter”.Creating custom adapters
If you need to deploy to a platform without an existing adapter, you can create your own. Adapters implement theAdapter interface from @sveltejs/kit: