Change8

@sveltejs/kit@3.0.0-next.7

Breaking Changes
📦 sveltekitView on GitHub →
5 breaking1 features🐛 9 fixes🔧 7 symbols

Summary

This release introduces major breaking changes, including the removal of `$app/stores` and changes to parameter file conventions, alongside several bug fixes for server execution and build processes.

⚠️ Breaking Changes

  • The type of `form.error` has changed from `any` to `App.Error | undefined`.
  • Tracing functionality has been moved out of the experimental namespace, and the `instrumentation` flag has been removed.
  • The `$app/stores` module has been removed. Consumers must find alternatives for the functionality previously provided here.
  • The use of `*.remote.ts/js` files is now disallowed unless `experimental.remoteFunctions` is explicitly enabled.
  • Param files in folders (e.g., `+page.params.js`) are removed in favor of using the `params.js/ts` file within the directory.

Migration Steps

  1. If you relied on `$app/stores`, migrate to the new mechanism for accessing those values.
  2. If you were using `*.remote.ts/js` files, either rename them or enable `experimental.remoteFunctions` in your configuration.
  3. Replace param files in folders (e.g., `src/routes/foo/[param]/+page.params.js`) with a single `params.js/ts` file in the corresponding directory (e.g., `src/routes/foo/[param]/params.js`).

✨ New Features

  • Adapters can now provide additional Vite plugins.

🐛 Bug Fixes

  • Deferred `query.refresh()` execution in server commands until after the command body completes.
  • Service worker and `tsconfig.json` resolution is now based on the Vite `root` setting.
  • Populated `$app/env/*` dynamic variables correctly in contexts that do not run the dev server, such as `vite-node`.
  • Stopped throwing "An impossible situation occurred" when a server-only module is imported by both server and client code.
  • Set `define` values on `globalThis` when running Vitest.
  • Served `.ico` files with the correct `image/x-icon` Content-Type.
  • Made the type for `paths.origin` looser.
  • Avoided a client build warning about externalizing `node:async_hooks`.
  • Allowed reserved words (e.g., `delete`, `class`) as remote function export names.

Affected Symbols