Migrating to SvelteKit @sveltejs/kit@3.0.0-next.12
Version @sveltejs/kit@3.0.0-next.12 introduces 6 breaking changes. This guide details how to update your code.
Released: 7/24/2026
⚠️ Check Your Code
If you use any of these symbols, you need to read this guide:
`Pathname``Path``Asset``AssetPath``event.url``event.params``event.route``$service-worker``$app/manifest``$app/paths``$app/service-worker``form.fields.foo.as(...)``version.pollInterval``alias` option`hook``hooks``query(...).set(...)``query(...).refresh()``tweak_types`Breaking Changes
●Issue #1
Renamed `Pathname` type to `Path` and `Asset` to `AssetPath`. Update your imports accordingly.
●Issue #2
Leading `/` has been removed from `Path` and `AssetPath`. Adjust any logic that relies on the presence of a leading slash.
●Issue #3
The `tsconfig.json` file is now written to `node_modules/$app/tsconfig`. Ensure your build process or IDE is configured to find it there.
●Issue #4
Accessing `event.url`, `event.params`, and `event.route` inside queries will now result in an error. Move this logic outside of queries.
●Issue #5
The `$service-worker` module has been deleted. Migrate any functionality to the new `$app/service-worker` module.
●Issue #6
New deployments are now detected on data, remote, and form action responses, tab focus, and visibility change. The default `version.pollInterval` has been set to 1 hour. Review your deployment and polling configurations.
Migration Steps
- 1Update imports from `Pathname` to `Path` and `Asset` to `AssetPath`.
- 2Remove leading `/` from `Path` and `AssetPath` if your code relies on it.
- 3Configure your build process or IDE to find `tsconfig.json` at `node_modules/$app/tsconfig`.
- 4Move `event.url`, `event.params`, and `event.route` access out of queries.
- 5Migrate functionality from the deleted `$service-worker` module to the new `$app/service-worker` module.
- 6Review your deployment and polling configurations due to changes in deployment detection and default `version.pollInterval`.
Release Summary
This release introduces new `$app` modules for manifest and service workers, enhances form handling validation, and includes several bug fixes. It also contains significant breaking changes related to type renames, path handling, and access restrictions within queries.
Need More Details?
View the full release notes and all changes for SvelteKit @sveltejs/kit@3.0.0-next.12.
View Full Changelog