Change8

Migrating to SvelteKit @sveltejs/kit@3.0.0-next.9

Version @sveltejs/kit@3.0.0-next.9 introduces 5 breaking changes. This guide details how to update your code.

Released: 7/17/2026

5
Breaking Changes
4
Migration Steps
7
Affected Symbols

⚠️ Check Your Code

If you use any of these symbols, you need to read this guide:

handle.resolve$lib#libfiles.libcookies.getCloudflare WranglerCSRF protection

Breaking Changes

Issue #1

`handle`'s `resolve` is now typed to always return a `Promise`. Update any code that expects `resolve` to return a non-Promise value.

Issue #2

The `$lib` alias has been replaced with `#lib`. Update all import paths that use `$lib` to use `#lib` instead. The `files.lib` configuration option has been removed.

Issue #3

Cross-origin form submissions are now disallowed without a `Content-Type` header. Ensure all cross-origin form submissions include a `Content-Type` header.

Issue #4

Server-only directories (e.g., `/server/` in the path) are now treated as server-only everywhere within the project, except for `src/routes` and the assets directory. Ensure your project structure adheres to this new rule.

Issue #5

CORS handling for static directory requests during development is now delegated to Vite. This may affect how CORS is handled for static assets in development environments.

Migration Steps

  1. 1
    Replace all instances of the `$lib` alias with `#lib` in import paths.
  2. 2
    Remove the `files.lib` configuration option from your project.
  3. 3
    Ensure all cross-origin form submissions include a `Content-Type` header.
  4. 4
    Update import paths for environment variables and application environment to use `$app/env/private`, `$app/env/public`, and `$app/env` instead of the deprecated aliases.

Release Summary

This release introduces several breaking changes including alias updates and stricter form submission rules. It also includes performance improvements and bug fixes for client-side bundling and CSRF protection.

Need More Details?

View the full release notes and all changes for SvelteKit @sveltejs/kit@3.0.0-next.9.

View Full Changelog