# SvelteKit 3 moves framework configuration into Vite and requires a runtime migration

SvelteKit 3 is stable with configuration moved to vite.config.js, a new #lib alias and minimum Node 22.17, TypeScript 6 and Vite 8 requirements; sv migrate can automate much of the transition.

The October major release simplifies SvelteKit's architecture but breaks familiar config files and legacy imports. Teams should run the codemod and verify adapters and deployments.

- Status: Active
- Published: 2026-10-08T17:54:21+13:00
- Updated: 2026-10-08T17:54:21+13:00
- Categories: Web Development, JavaScript, Frameworks
- Tags: migration, Svelte, SvelteKit, TypeScript, Vite
- Canonical HTML: https://beyondthe.news/dossiers/sveltekit-3-vite-config-lib-alias-migration

## What changed

The Svelte team released SvelteKit 3 on October 1, 2026 alongside sv CLI 1.0. The major removes svelte.config.js in favour of passing SvelteKit configuration through the Vite plugin in vite.config.js, replaces the $lib alias with #lib based on standard subpath imports, removes legacy modules and updates environment/error handling. Minimum dependencies include Node 22.17, TypeScript 6, Svelte 5.57.1 and Vite 8.0.12. The sv migrate sveltekit-3 command handles many mechanical changes and emits TODOs for remaining manual work.

## Why it matters

A production framework major can affect every build, test and deployment path, not just application syntax. Consolidating configuration with Vite reduces parallel config systems, while standard imports and stricter typing change assumptions in older SvelteKit projects. The CLI migration tool reduces effort but cannot guarantee application semantics or adapter compatibility.

## Configuration moves to the Vite plugin

SvelteKit configuration previously stored in svelte.config.js must move to vite.config.js. Tooling that reads or generates the old file needs updating.

## Aliases and legacy APIs change

The $lib alias is replaced by #lib, and older app/store and service-worker paths are retired. Migration diagnostics and codemods cover much but not all cases.

## Runtime requirements jump

SvelteKit 3 requires Node 22.17, TypeScript 6, Svelte 5.57.1 and Vite 8.0.12 or newer. CI, host images and adapters need version checks.

## sv 1.0 supports the migration

The official CLI reached 1.0 and includes a migration command plus an official community add-on API, making scaffolding and upgrades more consistent.

## Key details

- SvelteKit 3 became stable October 1, 2026.
- svelte.config.js is no longer supported; use Vite plugin configuration.
- The $lib alias moves to #lib.
- Minimums include Node 22.17, TypeScript 6, Svelte 5.57.1 and Vite 8.0.12.
- sv CLI 1.0 provides a SvelteKit 3 migration command and TODO generation.
- The project recommends upgrading to the latest 2.x first to receive targeted deprecation warnings.

## Builder takeaways

- Upgrade to the latest SvelteKit 2.x before running the official migration command.
- Move framework settings into vite.config and check every tool that imports config.
- Test routes, server-only modules, environment secrets and deployed adapters after codemods.
- Update CI Node/TypeScript/Vite versions and keep a rollback branch.

## What to watch

- Adapter compatibility and post-GA patch releases.
- Remote functions maturation and broader stable API boundaries.
- Migration regressions in larger SvelteKit 2 applications.

## Uncertainties

- The codemod does not guarantee semantic correctness or complete adapter migration.
- Some adjacent Svelte remote-function capabilities remain experimental.

## Sources

- [What's new in Svelte: October 2026](https://svelte.dev/blog/whats-new-in-svelte-october-2026) — Svelte · primary · 2026-10-01T00:00:00+13:00. Official stable release and sv CLI 1.0 confirmation.
- [Migrating to SvelteKit v3](https://svelte.dev/docs/kit/migrating-to-sveltekit-3) — SvelteKit · primary documentation · 2026-10-01T00:00:00+13:00. Official breaking changes and dependency requirements.
- [SvelteKit 3: config moves into vite.config](https://www.chornous.dev/blog/sveltekit-3-vite-config-lib-alias/) — chornous.dev · independent technical analysis · 2026-10-02T00:00:00+13:00. Independent migration consequences and caveats.

