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
- 01Rivet, a YC W23 Company, Runs Agent Actors on S3 and Claims 72 KB EachThe Apache 2.0 orchestrator says an actor cold-starts in 4.99 ms at p99. Every figure is Rivet's own, and the Launch HN thread questioned both the premise and the AWS bill.
- 02GitHub Actions Lockfiles: What gh actions-lock Pins and What It Leaves LooseWorkflow lockfiles went generally available on October 28. The extension's own README lists four gaps, including Docker images and reusable workflows in other repositories.
- 03C++26 Reportedly Fails Its ISO Ballot, With Contracts the Sticking PointSecondary reports put the October 23 vote at 12 yes of 20 and nine no votes of 22 bodies. The numbers do not reconcile, and no ISO or WG21 record has been published to settle them.
- 04A Postgres Benchmark Found jsonb Read One Key 2.7 to 10.6 Times Faster, and Larger on Disk in 6 of 11 CasesChris van Eijk of Now-Next loaded 1 million small documents and 5,000 large ones into PostgreSQL 17.11 and 18.6. The speed result is consistent. The storage result depends on whitespace and the 2 kB compression threshold.