GUIDES · BUILD CONFIGURATION

Deploy SvelteKit to Vercel: choose the right adapter

SvelteKit deploys with the wrong adapter or fails to create server routes. Learn how adapter-auto differs from adapter-vercel and what to check in the output.

The symptom depends on what you are deploying

A SvelteKit app may build successfully on your laptop but serve blank or missing server routes after deployment, or the build may complain about an unsuitable adapter. Unlike a plain Vite SPA, SvelteKit can generate both static assets and server-side handlers. The adapter chooses the deployment output.

First confirm that this is SvelteKit rather than Svelte + Vite. Look for @sveltejs/kit in package.json and a svelte.config.js or svelte.config.ts file.

Use the Vercel adapter for explicit deployment

adapter-auto may detect supported hosting platforms, including Vercel, in supported releases. An explicit @sveltejs/adapter-vercel installation makes the intended platform clear and avoids relying on environment detection in nonstandard builds.

Install the adapter with the package manager used by the repository, and wire it into SvelteKit's own configuration rather than a Vite-only config.

npm install -D @sveltejs/adapter-vercel

// svelte.config.js
import adapter from "@sveltejs/adapter-vercel";

const config = {
  kit: { adapter: adapter() }
};
export default config;

Remove adapters for other platforms

If the repository still imports adapter-node, adapter-static, adapter-netlify or adapter-cloudflare, Vercel may receive output intended for another host. Swap to the Vercel adapter and redeploy. If your product truly is static, adapter-static can be appropriate, but you must account for how server endpoints and dynamic routes will be handled.

Also verify Framework Preset and Root Directory in Vercel project settings. SvelteKit code inside apps/web must not be built from an unrelated package root.

Test both page and endpoint behavior

Open a prerendered page, a page rendered on request, and a +server.ts endpoint. A good homepage alone cannot prove that server features deployed correctly.

Reference: SvelteKit documentation on adapters and the Vercel SvelteKit deployment guide. DeployDoctor checks some adapter and build configuration mismatches; it does not replace requesting the deployed endpoints.

Updated 2026-10-21