Skip to main content

Announcing SvelteKit 2

A special SvelteKit anniversary release

Version 2.0 of SvelteKit, the official framework for building apps with Svelte, is now available. It is an incremental release that adds support for the newly-released Vite 5 along with a bevy of small improvements and one much-requested feature.

If you've been paying close attention to Svelte in recent months, you'll know that we've been hard at work on Svelte 5, which is possibly the most anticipated release in the project's history. Upgrading to SvelteKit 2 will smooth the path for Svelte 5 when it is released in 2024, and we encourage all users to upgrade when you get a chance.

We recommend updating to the most recent 1.x release first, along with Svelte 4, in order to address any deprecation warnings. Then, upgrade to SvelteKit 2 by running the automated migration tool:

npx svelte-migrate sveltekit-2

The migration guide has more details about what's new.

Shallow routing

Way back in the mists of time — May, to be precise — we teased a new feature that allows you to associate state with a history entry without causing navigation. It's very useful for creating modals that you can dismiss by swiping back, or pop-up views of routes you don't want to do a full navigation to.

That feature is called shallow routing, and this week we finally dusted off the pull request and added it to the framework. We're excited to see what you use it for.

One year of SvelteKit

Today is the one year anniversary of SvelteKit’s launch and we’re excited to celebrate how far SvelteKit has come. SvelteKit has been quickly embraced by the web development community:

Screenshot of @flaviocopes tweet with a poll titled 'You have to create a web app from scratch'. SvelteKit is the winner above Next, Nuxt and Laravel with 42.1% of the vote
Tweet from @flaviocopes

In the past year, we’ve seen a number of open source projects like Storybook, Tailwind, and Playwright officially support SvelteKit as well as a number of commercial entities like Prismic, Sentry, and InLang.

SvelteKit continues to benefit from the Svelte community, which has developed numerous great UI libraries like Skeleton, shadcn-svelte, Melt UI, Flowbite Svelte, daisyUI, and many more. And our first ever hackathon saw winners from amazing Svelte projects like Superforms, Threlte, and SvelteLab.

Finally, we’ve also launched major supporting projects like a new Svelte DevTools (chrome web store, GitHub, talk), Svelte Inspector (docs, talk), and experimental image optimization support (docs, talk).


In addition to the ongoing image work, we’ll be working to improve support for Svelte 5 and internationalization in upcoming releases. The first parts of that work have already landed in SvelteKit 2, which includes improved support for prerendering URLs with optional path segments often used to specify a language. Thank you to the team from InLang who contributed this improvement.