The SvelteKit 3 Release Candidate is here
SvelteKit 3 has now entered the Release Candidate phase. Once the testing phase is complete, a stable release will be rolled out soon without any further breaking changes. However, there are some breaking changes from SvelteKit 2. This release aims to streamline the codebase and set the stage for SvelteKit's future growth. To update an existing app, one can utilize the new sv migrate tool, which will automatically migrate as much of the code as possible.
For the remaining parts, it will produce a TODO list for developers to address. The migration guide can be found on next.svelte.dev, which will be the home for SvelteKit 3 documentation until the stable release.
Key changes in SvelteKit 3 include the migration from svelte.config.js to subpath imports, which is now supported natively by Vite and TypeScript. Additionally, tsconfig.json has been updated to extend $app/tsconfig instead of the previous ./.svelte-kit/tsconfig.json. SvelteKit 3 also simplifies service worker integration by allowing direct imports from $app/env, $app/paths, and $app/manifest module.
Environment variables have been enhanced, enabling seamless type-safe, secure, and validated variables through explicit environment variables feature.
Another notable update is the requirement for Svelte 5 instead of Svelte 4, which brings more comprehensive error handling capabilities. SvelteKit 3 now uses the Vite Environment API, streamlining build logic and removing FetchableDevEnvironment. These updates aim to improve the overall development experience and facilitate future growth of SvelteKit.
Written by urgent.news from Lobsters's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.