SvelteKit 3 Moves Config Into Vite and Renames $lib to #lib
Software / news
SvelteKit 3 Moves Config Into Vite and Renames $lib to #lib
The stable release on Oct. 1 requires Svelte 5 and Vite 8, and the new import alias needs a file extension on every path.
SvelteKit 3 shipped Oct. 1, and every project that upgrades has to touch two things it has not touched before: the config file and every import that starts with $lib. The Svelte team's release post calls it "the same framework with a little more polish, a little more type safety, and a little less junk."
The junk being removed is the part that breaks builds. SvelteKit 3 requires Svelte 5 and Vite 8, according to the team's release candidate post of Aug. 13, so a project still on Svelte 4 cannot take the upgrade in one step.
The changes that break a build
The release candidate post lists six breaking changes. Each one is a find-and-replace across a real codebase, and the first two reach almost every file.
| Before | In SvelteKit 3 |
|---|---|
Config in svelte.config.js | Config in vite.config.ts |
$lib/foo | #lib/foo.ts, extension required |
tsconfig.json extends ./.svelte-kit/tsconfig.json | Extends $app/tsconfig |
$service-worker module | $app/env, $app/paths and new $app/manifest |
| Vite optional | Vite 8 required |
pushState and replaceState | goto with shallow: true |
The #lib change leans on Node's own subpath imports declared in package.json, instead of a SvelteKit-specific alias. The cost is the file extension. An import that read $lib/utils becomes #lib/utils.ts.
The config move has a documented reason. Configuration now sits in vite.config.ts so the Vite plugin can read it synchronously instead of waiting on an asynchronous resolution step, according to InfoQ's report on the release candidate.
The migration command and what it covers
The team ships a codemod, run with npx sv migrate sveltekit-3 --tasks all --confirm. New projects start from npx sv create my-new-app. The post does not say which of the six changes the codemod cannot do, and no one has published a count of how many manual edits remain after it runs. This report did not run the migration against a real project.
The release candidate went out Aug. 13, so the gap to the stable release was 49 days.
What is still experimental
Remote functions, the type-safe client-server calls the team has made its top priority, are not part of the stable surface. They still sit behind an experimental flag that depends on Async Svelte.
The team's release candidate post describes the error-handling rework as the other headline feature: +error.svelte rendering on failures, with sourcemap support, and environment variables validated against a schema. Neither is a reason to rush the upgrade, since the build-breaking changes arrive whether or not an app uses them.
Breaking releases tend to hit the tools around a framework first. Zig 0.17.0 broke its language server until that tool's own release landed. The Svelte post lists no tool that breaks on SvelteKit 3. For a different take on what a web page should cost, see IANA's example.com redesign, which it justified on bandwidth.
The next date to plan around is Svelte Summit 2026 in Ljubljana, Slovenia, on Nov. 19 and 20, which the team said will also mark Svelte's 10th birthday.
Sources
More in Software
- 01Vino, the Rust DisplayLink Driver, Went Dark After Synaptics Cited Two UK PatentsThe kernel patch series never got a pixel onto a dock. A cease-and-desist letter and a reply on the Linux kernel mailing list now decide whether it gets further.
- 02Claude Sheets and Whiteboards Ship Off by Default for Enterprise; Claude Data Switches On Nov. 19Anthropic's help page renames Claude Dashboards to Claude Data and moves it to general availability, while two new beta tools wait for an admin to enable them.
- 03Chrome's Modern Web Guidance Gives Coding Agents 250 Web Features to Use Instead of LibrariesThe Apache-2.0 skill pack, stewarded by the Chrome, Edge, Firefox and MDN teams, installs into Claude Code and four other agents and targets Baseline browser support.
- 04Git Contributors Draft a Debian-Style Vote on Whether to Keep the Ban on AI-Looking PatchesThe project has not agreed who may vote, how ballots are counted or what the options are, and the policy under dispute rejects any patch that looks AI generated.