🛠️SvelteKit 3 RC: Pruning Old Code for Future Evolution
SvelteKit 3 RC: Pruning Old Code for Future Evolution
TL;DR
SvelteKit 3 has reached the release candidate phase, focusing on pruning older code and laying groundwork for future evolution. Key changes include moving configuration to vite.config.ts and retiring the $lib alias.
SvelteKit 3 has reached the release candidate phase, with a focus on pruning older code and laying groundwork for the framework's evolution. If testing goes smoothly, a stable release with no further breaking changes is expected. This update moves configuration from svelte.config.js to vite.config.ts and retires the $lib alias in favor of #lib, which leans on Node's native subpath imports. Developers building full-stack web applications with SvelteKit should pay attention to these changes, especially those using Svelte 5 and Vite 8. The migration guide points existing apps at the CLI command: npx sv@next migrate sveltekit-3 --tasks all --confirm.

Key Points
SvelteKit 3 RC focuses on pruning older code and laying groundwork for future evolution.
Configuration in SvelteKit 2's svelte.config.js has been moved to vite.config.ts.
The $lib alias has been retired in favor of #lib, which uses Node's native subpath imports.
File extensions are now required, turning $lib/foo into #lib/foo.js.
SvelteKit 3 requires Svelte 5 and Vite 8, with faster builds using Rolldown bundler.
Why It Matters
If you're building full-stack web apps with SvelteKit, the move to vite.config.ts and the retirement of $lib alias in favor of #lib will impact your workflow. Smaller databases should stay put, but anyone on Aurora Serverless v2 gets this automatically starting November 1.
Comments
Be the first to comment
Enjoyed this article?
Get it daily. 7am. Free. Reads in 5 minutes.
Join 3,567 builders reading daily.