SvelteKit 3 shipped on October 1st, and the upgrade path is about as smooth as a major version gets. One command does most of the work:
npx sv migrate sveltekit-3 --tasks all --confirm
Enter fullscreen mode
Exit fullscreen mode
It moves your config from svelte.config.js into the sveltekit() plugin in vite.config.ts , rewrites $lib imports to #lib subpath imports, swaps $app/stores for $app/state , and leaves a TODO list for whatever it couldn't handle. Run it, fix the TODOs, get a green svelte-check , ship.
The catch is that the riskiest changes in the migration guide aren't renames. They're behavior changes. Your code still compiles, your types still pass, and your app now does something different at runtime. A codemod can't flag those because there's nothing syntactically wrong. Here are the ones worth auditing by hand.
Your error hook just got a lot louder
In SvelteKit 2, handleError only ran for unexpected errors. If you threw error(404, 'Not found') from a load function, the hook never saw it.β¦