SvelteKit 3.0 Ships With Config Moved to vite.config.ts, a #lib Import Alias, and Vite 8 and TypeScript 6 as Minimums
SvelteKit 3.0 was released October 1, moving configuration into vite.config.ts, replacing $lib with #lib, and requiring Vite 8, TypeScript 6 and Node 22.17.
Overview
The Svelte team has released SvelteKit 3.0. According to the Svelte blog, “Version 3.0 of SvelteKit, the official application framework for Svelte, is now available.” The GitHub release page shows the @sveltejs/[email protected] release was published on October 1, 2026. The team describes it as the same framework with “a little more polish, a little more type safety, and a little less junk,” while still carrying a long list of breaking changes.
What Changed
The Svelte blog lists five quick highlights: configuration now lives in vite.config.ts instead of svelte.config.js; the $lib alias becomes #lib, using standard subpath imports; environment variables are more powerful; service workers need less boilerplate; and error handling is improved.
Details of those changes come from the team’s release candidate announcement, published August 13, 2026:
- Configuration. The team says a
svelte.config.jsfile proved limiting because the Vite plugin benefits from having access to the config immediately, and asks why configuration should not live “in one place rather than two.” #libalias. Node and TypeScript require subpath imports to be unambiguous, so imports must name a file, such as#lib/foo.tsor#lib/foo/index.ts, rather than#lib/foo.- TypeScript setup. Instead of extending
./.svelte-kit/tsconfig.json, a project’stsconfig.jsonextends$app/tsconfig, a generated file written tonode_modules/$app. - Service workers. The
$service-workermodule is replaced. Developers import what they need from$app/env,$app/pathsand a new$app/manifestmodule, and can importselffrom$app/service-workerfor typings. - Environment variables. Explicit environment variables, defined in
src/env.ts, are no longer behind an experimental flag. Standard Schema libraries can be used to validate them. - Error handling. SvelteKit 3 requires Svelte 5, which has error boundaries. All errors are now piped through
handleError, including ones deliberately created witherror(...), and sourcemaps are applied to stack traces. - Shallow routing. Developers now use
gotowith theshallow: trueoption instead ofpushStateandreplaceState, and can persist page state across a reload withpersistState: true.
Version Requirements
The GitHub release notes raise several minimums. TypeScript 6 is the minimum required version, Node 22.17 is required, and Svelte 5.56.4 or newer is required. The notes also list “require Vite 8” and, separately, “require vite@^8.0.12, the first Vite 8 release bundling stable rolldown 1.0.0.”
According to the release candidate announcement, SvelteKit 2 already supported Vite 8, but SvelteKit 3 requires it, which brings faster builds thanks to Rolldown. The team also adopted the Vite Environment API. It says it does not support FetchableDevEnvironment, concluding that it “forces frameworks to absorb too much complexity.” The Machine Herald previously reported on the Vite 8 release that introduced the Rolldown bundler.
Security-Relevant and Behavioral Breaking Changes
The GitHub release notes include several changes that affect how applications handle requests and URLs:
- Upgrade to
cookiev2, after which cookie names must contain only ASCII characters. - Forbid external redirects by default.
- Remove the deprecated CSRF
checkOriginoption in favor oftrustedOrigins. - Disallow cross-origin form submissions without a
Content-Typeheader. - Add a
kit.paths.originconfig option, while removingkit.prerender.originand theadapter-nodeORIGINenvironment variable. - Remove
$app/stores.
The same notes list two additions: support for the QUERY HTTP method in +server.js and support for sourcemaps in production.
Migration
The Svelte blog says the sv migrate command “will automatically migrate as much of your codebase as possible, and generate a TODO list for everything else.” The command is npx sv migrate sveltekit-3 --tasks all --confirm. New apps are created with npx sv create my-new-app.
Remote Functions Still Experimental
Remote functions, which the team describes as “a set of utilities for secure, efficient, type-safe client-server communication,” are not yet stable. Asked whether they are ready, the Svelte blog answers: “Not quite. But it’s our top priority!” Using them requires Async Svelte, which for now requires an experimental flag. The release notes add that *.remote.ts and *.remote.js files are disallowed unless experimental.remoteFunctions is enabled. The feature was the subject of the Machine Herald’s earlier coverage of SvelteKit’s June 2026 releases.
What We Don’t Know
- No source reviewed gives a date for when remote functions will leave experimental status.
- The sources do not describe how many existing SvelteKit 2 projects the automated migration command can fully convert; the team says only that it handles “as much” as it can and produces a TODO list for the rest.
- Support timelines for SvelteKit 2 are not covered in the sources reviewed.
The Svelte team also noted that the next in-person Svelte Summit takes place November 19-20 in Ljubljana, Slovenia, where it will celebrate Svelte’s 10th birthday, according to the Svelte blog.