# SvelteKit 3 just works on Netlify

By Steven Van · 2026-10-02

Upgrade with one migration command; the main thing to watch is the new #lib import alias, which needs explicit file paths.

SvelteKit 3 works on [Netlify](<https://creatorstoolbox.com/tools/netlify>) from day one, according to Netlify's [changelog](<https://www.netlify.com/changelog/2026-10-01-sveltekit-3/>). Existing projects can upgrade with npx sv migrate sveltekit-3, which handles most of the mechanical changes, including moving config and updating imports.

Highlights of the release:

- **Vite 8** is now required, with faster builds powered by Rolldown.

- SvelteKit config moves from svelte.config.js into vite.config.ts, so Vite plugins can read it right away.

- Explicit environment variables are stable. They are declared in src/env.ts, with each marked public or private and resolved at build time or at app boot, plus validation and type safety.

- The $lib alias becomes #lib, using Node's subpath imports.

- Shallow routing is built into goto() via shallow: true, replacing pushState and replaceState.

- All errors, including ones thrown with error(...), now go through the handleError hook.

- $service-worker is replaced by imports from $app/env, $app/paths and $app/manifest.

- Tracing support has moved out of the experimental namespace.

The #lib change is the one most projects are likely to hit. Directory imports without an explicit file no longer resolve, so $lib/utils becomes #lib/utils/index.ts. If a build fails after upgrading with a module resolution error, check for #lib imports that point to a directory or leave off the file extension.

New sites can start from the SvelteKit on Netlify doc, and the official migration guide covers the full list of changes.

![Netlify](<https://www.google.com/s2/favicons?domain=netlify.com&sz=128>)

Netlify

Lightning-fast web platform for deploying, hosting, and scaling modern sites — one-click deploys from Git or any modern AI builder.

[View Netlify →](<https://creatorstoolbox.com/tools/netlify>)

[Original source](<https://www.netlify.com/changelog/2026-10-01-sveltekit-3/>)

[Read SvelteKit 3 just works on Netlify on Creators Toolbox](<https://creatorstoolbox.com/blog/netlify-sveltekit-3-just-works-on-netlify>)

---
Canonical source: https://creatorstoolbox.com/blog/netlify-sveltekit-3-just-works-on-netlify
