SvelteKit 3 Changes

What changed between SvelteKit 2 (which most existing material covers) and SvelteKit 3, the current line (3.0.1, October 2026).

Config moves into Vite

The biggest structural change: svelte.config.js’s config.kit.* options move into the sveltekit() Vite plugin options in vite.config.js, alongside compilerOptions and the adapter:

// vite.config.js
import { sveltekit } from '@sveltejs/kit/vite';
import adapter from '@sveltejs/adapter-auto';
import { defineConfig } from 'vite';

export default defineConfig({
    plugins: [
        sveltekit({
            adapter: adapter(),
            compilerOptions: { experimental: { async: true } },
        }),
    ],
});

There is no separate kit config file anymore; options that were config.kit.adapter become top-level plugin options.

Migration tooling

Upgrade to the latest 2.x first (it emits targeted deprecation warnings), then:

npx sv migrate sveltekit-3

Behavioral changes

  • Cookie default path: cookies set without an explicit path now default to / instead of the current request path. Audit any cookie logic that relied on the old scoping:
cookies.set(name, value, { path: '/some/path' }); // be explicit where scope matters
  • Async compiler is opt-in via compilerOptions.experimental.async, which remote functions require (see Remote Functions)

Gotcha: most SvelteKit 2 tutorial material online predates the config move. If a guide tells you to edit svelte.config.js kit options, translate it to Vite plugin options first.

Adoption note for this lab

learn/sveltekit content written before October 2026 used Kit 2-era conventions. The pages in this topic have been verified against the version-3 docs branch; if you find svelte.config.js-style instructions anywhere in the lab, treat them as stale.