<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/sveltekit-3-moves-config-into-vite-and-replaces-lib-with-lib-qglduve7z" -->

---
title: SvelteKit 3 moves config into Vite and replaces $lib...
description: SvelteKit 3.0 has shipped as a cleanup release focused on polish, type safety, and tidier code rather than conceptual changes. It requires Vite 8 (with...
canonical: https://daily.dev/posts/sveltekit-3-moves-config-into-vite-and-replaces-lib-with-lib-qglduve7z
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: SvelteKit 3 moves config into Vite and replaces $lib with #lib | daily.dev
og:description: SvelteKit 3.0 has shipped as a cleanup release focused on polish, type safety, and tidier code rather than conceptual changes. It requires Vite 8 (with...
og:url: https://daily.dev/posts/sveltekit-3-moves-config-into-vite-and-replaces-lib-with-lib-qglduve7z
og:image: https://api.daily.dev/og/posts/QGlduve7Z.png
og:image:alt: SvelteKit 3 moves config into Vite and replaces $lib with #lib
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# SvelteKit 3 moves config into Vite and replaces $lib with #lib

**[Collections](https://daily.dev/sources/collections)** · 2 min read · 15 upvotes · 1 comments

## Summary

SvelteKit 3.0 has shipped as a cleanup release focused on polish, type safety, and tidier code rather than conceptual changes. It requires Vite 8 (with Rolldown) and Svelte 5. Configuration moves from svelte.config.js into vite.config.ts, and the $lib alias is replaced by #lib, built on Node's native subpath imports, which now requires file extensions in import paths. Error handling improves with +error.svelte catching load and render failures and sourcemapped stack traces. Shallow routing shifts from pushState to a goto option, and environment variable handling and service workers are simplified. A CLI command, npx sv@next migrate sveltekit-3, automates most of the upgrade and flags anything it can't handle. Remote functions, a typed client-server RPC feature similar to React Server Actions, remain experimental and require Async Svelte. Svelte Summit takes place November 19-20 in Ljubljana, marking Svelte's 10th anniversary.

## Content

SvelteKit 3.0 is out after a release candidate phase. It's a cleanup release, not a feature release. Existing users shouldn't hit major conceptual shifts, just polish, better type safety and tidier code.

## What changed

- **Config moves to Vite.** Settings that lived in `svelte.config.js` now go in `vite.config.ts`, so the Vite plugin can resolve config synchronously.
- **`$lib` becomes `#lib`.** The new alias uses Node's native subpath imports from `package.json`. The catch is that import paths now need file extensions.
- **New requirements.** SvelteKit 3 needs Vite 8 (which uses Rolldown) and Svelte 5.
- **Error handling.** `+error.svelte` now handles failures in both load and render. Stack traces are sourcemapped.
- **Shallow routing.** It moves from `pushState` to a `goto` option.
- **Smaller changes.** Environment variable handling is improved and service workers are simpler.

## Migrating

The `sv migrate` CLI does most of the work and leaves a TODO list for whatever it can't automate. During the release candidate the command was `npx sv@next migrate sveltekit-3`.

## Remote functions

Remote functions are a typed client-server RPC feature, similar in spirit to React Server Actions. They are still experimental and require Async Svelte.

## Reaction

The `$lib` to `#lib` rename got a mixed response on Reddit. Some developers were annoyed that it no longer matches `$app`, then came around once they noticed they could use the alias outside SvelteKit.

Vercel's @rauchg called SvelteKit 3 "a wonder" and said he is looking forward to Async Svelte and Remote Functions. He built a small app that built and deployed in 15 seconds end to end.

## Svelte Summit

Svelte Summit takes place November 19-20 in Ljubljana, and also marks Svelte's 10th anniversary.

## Questions this post answers

### What changed in SvelteKit 3 regarding configuration and the $lib alias?

SvelteKit 3.0 moves configuration out of svelte.config.js into vite.config.ts so the Vite plugin can resolve it synchronously, and replaces the $lib alias with #lib, built on Node's native subpath imports in package.json. Import paths using the new alias now require file extensions. SvelteKit 3 requires Vite 8 (which uses Rolldown) and Svelte 5.

_Developers planning a SvelteKit upgrade track breaking changes like this one on daily.dev._

### How do I upgrade an existing SvelteKit project to SvelteKit 3?

Run npx sv@next migrate sveltekit-3, a CLI command that automates most of the migration work, including moving configuration into vite.config.ts and updating the $lib alias to #lib. Anything the tool cannot handle automatically gets flagged in a TODO list for manual review.

_Teams migrating frameworks rely on daily.dev to stay on top of upgrade tooling like this._

### Are SvelteKit remote functions ready for production use?

No, remote functions remain experimental in SvelteKit 3.0. They provide a typed client-server RPC feature comparable to React Server Actions, but they require Async Svelte and are not yet considered stable for general use.

_Developers evaluating new RPC patterns compare experimental features like this via daily.dev._

## Community discussion

Top comments from developers on daily.dev.

**@romeltech** · 0 upvotes

> about time?

## Similar posts on daily.dev

- [The SvelteKit 3 Release Candidate is here](https://daily.dev/posts/the-sveltekit-3-release-candidate-is-here-lootbllps) · Svelte Blog · 72 upvotes · 5 comments
- [What’s new in Svelte: July 2026](https://daily.dev/posts/what-s-new-in-svelte-july-2026-yjmmqqvqz) · Svelte Blog · 50 upvotes · 4 comments
- [SvelteKit 3 puts heat on Next.js with radical approach to RPCs](https://daily.dev/posts/sveltekit-3-puts-heat-on-next-js-with-radical-approach-to-rpcs-mfzwc6pvz) · DEVCLASS · 7 upvotes · 1 comments

---

Tags: [#javascript](https://daily.dev/tags/javascript), [#vite](https://daily.dev/tags/vite), [#svelte](https://daily.dev/tags/svelte), [#sveltekit](https://daily.dev/tags/sveltekit)

[View this post on daily.dev](https://daily.dev/posts/sveltekit-3-moves-config-into-vite-and-replaces-lib-with-lib-qglduve7z)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"SvelteKit 3 moves config into Vite and replaces $lib with #lib","url":"https://daily.dev/posts/sveltekit-3-moves-config-into-vite-and-replaces-lib-with-lib-qglduve7z","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/sveltekit-3-moves-config-into-vite-and-replaces-lib-with-lib-qglduve7z"},"datePublished":"2026-10-01T20:06:47.762Z","dateModified":"2026-10-02T01:51:27.303Z","description":"SvelteKit 3.0 has shipped as a cleanup release focused on polish, type safety, and tidier code rather than conceptual changes. It requires Vite 8 (with...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/c7428f2545182564219b7bc899817a5c?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/c7428f2545182564219b7bc899817a5c?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Collections","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Collections","logo":"https://media.daily.dev/image/upload/s--fk_6ycEi--/f_auto,q_auto/v1780996001/logos/collections?_a=BAMAMiWQ0","url":"https://daily.dev/sources/collections"},"commentCount":1,"discussionUrl":"https://daily.dev/posts/sveltekit-3-moves-config-into-vite-and-replaces-lib-with-lib-qglduve7z","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":15},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":1}],"keywords":"javascript,vite,svelte,sveltekit","timeRequired":"PT2M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Collections","item":"https://daily.dev/sources/collections"},{"@type":"ListItem","position":3,"name":"SvelteKit 3 moves config into Vite and replaces $lib with #lib"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/sveltekit-3-moves-config-into-vite-and-replaces-lib-with-lib-qglduve7z","comment":[{"@type":"Comment","text":"about time?","datePublished":"2026-10-02T14:00:03.349Z","url":"https://daily.dev/posts/QGlduve7Z#c-B0WJyj67L","author":{"@type":"Person","name":"Romel","url":"https://daily.dev/romeltech","image":"https://lh3.googleusercontent.com/a/ACg8ocLXdVM7dm8jXeGczNpFrzBpySAvTP-5-3hA50WtCchAWgPZBvRQ=s96-c"}}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/sveltekit-3-moves-config-into-vite-and-replaces-lib-with-lib-qglduve7z#faq","mainEntity":[{"@type":"Question","name":"What changed in SvelteKit 3 regarding configuration and the $lib alias?","acceptedAnswer":{"@type":"Answer","text":"SvelteKit 3.0 moves configuration out of svelte.config.js into vite.config.ts so the Vite plugin can resolve it synchronously, and replaces the $lib alias with #lib, built on Node's native subpath imports in package.json. Import paths using the new alias now require file extensions. SvelteKit 3 requires Vite 8 (which uses Rolldown) and Svelte 5. Developers planning a SvelteKit upgrade track breaking changes like this one on daily.dev."}},{"@type":"Question","name":"How do I upgrade an existing SvelteKit project to SvelteKit 3?","acceptedAnswer":{"@type":"Answer","text":"Run npx sv@next migrate sveltekit-3, a CLI command that automates most of the migration work, including moving configuration into vite.config.ts and updating the $lib alias to #lib. Anything the tool cannot handle automatically gets flagged in a TODO list for manual review. Teams migrating frameworks rely on daily.dev to stay on top of upgrade tooling like this."}},{"@type":"Question","name":"Are SvelteKit remote functions ready for production use?","acceptedAnswer":{"@type":"Answer","text":"No, remote functions remain experimental in SvelteKit 3.0. They provide a typed client-server RPC feature comparable to React Server Actions, but they require Async Svelte and are not yet considered stable for general use. Developers evaluating new RPC patterns compare experimental features like this via daily.dev."}}]}
```

