unstale

npm / @sveltejs/kit

@sveltejs/kit

What changed in @sveltejs/kit 2 to 3, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-25.

130 breaking24 security9 deprecations48 new APIs and options5 performance28 behavior and defaults13 tooling221 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

@sveltejs/kit 3211 changes

Breaking changes 84

  • Requests using the wrong HTTP method are rejected.

    3.4.0release notes

  • Binary remote forms referencing files with an empty file-offset table are now rejected with 400 Bad Request.

    3.2.0release notes

  • resolve now rejects URL inputs.

    3.2.0release notes

  • Server-only modules can no longer be imported into browser code via src/params.js.

    3.1.1release notes

  • 204 responses now return no content.

    3.0.0release notes

  • Adapter Vite plugins are separated into pre and post.

    3.0.0release notes

  • ActionResult and SubmitFunction move from @sveltejs/kit to $app/forms.

    3.0.0release notes

  • Navigation-related types, including GotoOptions, move from @sveltejs/kit to $app/navigation.

    3.0.0release notes

  • The base, assets, and resolveRoute exports are removed from $app/paths.

    3.0.0release notes

  • Remote function types move to $app/server.

    3.0.0release notes

  • Page, ReadonlyURL, and ReadonlyURLSearchParams move from @sveltejs/kit to $app/state.

    3.0.0release notes

  • The $app/stores module is removed.

    3.0.0release notes

  • The type is renamed from Asset to AssetPath; leading / is removed from AssetPath values.

    3.0.0release notes

  • createEntries is removed from the Builder object passed to adapter functions.

    3.0.0release notes

  • builder.generateManifest is replaced with builder.generateServerInstance and builder.manifest.

    3.0.0release notes

  • The deprecated CSRF option is removed in favor of trustedOrigins.

    3.0.0release notes

  • A config exported from a universal route file takes precedence over one exported from a server route file.

    3.0.0release notes

  • The cookie dependency is upgraded to v2, which requires cookie names to contain only ASCII characters.

    3.0.0release notes

  • The cookie path option now defaults to /.

    3.0.0release notes

  • Cross-origin form submissions without a Content-Type header are disallowed.

    3.0.0release notes

  • Enhanced cross-page form actions navigate to the action page on success and failure, matching native form behavior.

    3.0.0release notes

  • Clicking a link to the current URL refreshes all load functions and queries.

    3.0.0release notes

  • The option value off is removed in favor of false.

    3.0.0release notes

  • The data-sveltekit-noscroll and data-sveltekit-keepfocus attributes are replaced by data-sveltekit-reset.

    3.0.0release notes

  • The experimental.handleRenderingErrors flag is removed.

    3.0.0release notes

  • External redirects are forbidden by default.

    3.0.0release notes

  • Form action responses now use the HTTP status code returned from fail.

    3.0.0release notes

  • The type changes from any to App.Error | undefined.

    3.0.0release notes

  • getRequest is now synchronous.

    3.0.0release notes

  • goto rejects when given a URL that does not resolve to a route within the app.

    3.0.0release notes

  • The noScroll and keepFocus options are replaced by the reset option.

    3.0.0release notes

  • handle's resolve is now typed to always return a Promise.

    3.0.0release notes

  • All errors now pass through the handleError hook.

    3.0.0release notes

  • handleError can influence the status code.

    3.0.0release notes

  • handleValidationError is removed; remote function validation errors are passed to handleError with kind: 'validation'.

    3.0.0release notes

  • HEAD requests are answered without a response body.

    3.0.0release notes

  • Environment variables are populated before instrumentation.server.js is evaluated, and the adapter instrumentation API is updated.

    3.0.0release notes

  • Calling invalidate or invalidateAll during navigation no longer aborts navigation.

    3.0.0release notes

  • Adds kit.paths.origin; kit.prerender.origin and the adapter-node ORIGIN environment variable are removed.

    3.0.0release notes

  • The $lib alias is replaced with #lib, and files.lib configuration is removed.

    3.0.0release notes

  • The #lib definition is removed from paths, requiring explicit module extensions.

    3.0.0release notes

  • The deprecated .run() method is removed from live queries.

    3.0.0release notes

  • The delta property now exists only for popstate navigation events.

    3.0.0release notes

  • The generated tsconfig is now written to node_modules/$app/tsconfig.

    3.0.0release notes

  • Node 22.17 or newer is required.

    3.0.0release notes

  • page.url is immutable at the type level.

    3.0.0release notes

  • Param files in folders are removed in favor of a params.js/ts file.

    3.0.0release notes

  • The type is renamed from Pathname to Path; leading / is removed from Path values.

    3.0.0release notes

  • The deprecated pragma header is removed from version polling for improved CORS support.

    3.0.0release notes

  • preloadCode takes a route ID instead of a pathname; route IDs are not prefixed with paths.base.

    3.0.0release notes

  • The result type for preloadData now includes an error result.

    3.0.0release notes

  • The option is removed; modulepreload is always used.

    3.0.0release notes

  • Fallback handlers are rejected on prerendered endpoints.

    3.0.0release notes

  • Programmatic form validation skips clean fields.

    3.0.0release notes

  • Accessing event.url, event.params, or event.route inside queries now errors.

    3.0.0release notes

  • Values set or refreshed from within a query during SSR are serialized into the rendered HTML.

    3.0.0release notes

  • Submitting a remote form without JavaScript preserves the current URL search parameters.

    3.0.0release notes

  • These files are disallowed unless experimental.remoteFunctions is enabled.

    3.0.0release notes

  • Route ID escape sequences are expanded when resolving a route ID to a pathname.

    3.0.0release notes

  • RouteId includes only routes with a +page or +server file.

    3.0.0release notes

  • The Server constructor is removed from public types.

    3.0.0release notes

  • Nested server-only directories are supported, and /server/ paths are treated as server-only throughout the project except in src/routes and the assets directory.

    3.0.0release notes

  • Server-side self-fetch fallbacks no longer follow redirects.

    2.70.4, 3.0.0release notesrelease notes

  • The $service-worker module is deleted.

    3.0.0release notes

  • Service worker registrations use type: 'module'.

    3.0.0release notes

  • setResponse is now synchronous.

    3.0.0release notes

  • The server errors if it does not respect a client-requested single-flight mutation, and can explicitly ignore refreshes.

    3.0.0release notes

  • SSRManifest is removed from public types.

    3.0.0release notes

  • Subresource requests receive a lightweight 404 instead of rendering the error page.

    3.0.0release notes

  • Svelte 5.56.4 or newer is required.

    3.0.0release notes

  • Svelte config options must be passed through the Vite plugin.

    3.0.0release notes

  • defineEnvVars moves to @sveltejs/kit/env.

    2.70.0, 3.0.0release notesrelease notes

  • Environment-related types move to @sveltejs/kit/env.

    3.0.0release notes

  • Hooks-related types move to @sveltejs/kit/hooks.

    3.0.0release notes

  • The @sveltejs/kit/node/polyfills module is removed.

    3.0.0release notes

  • defineParams and its associated types move to @sveltejs/kit/params.

    3.0.0release notes

  • Version 7 is required.

    3.0.0release notes

  • Tracing moves out of the experimental namespace, and the instrumentation flag is removed.

    3.0.0release notes

  • Load functions rerun when the number of values of a tracked search parameter changes.

    3.0.0release notes

  • TypeScript 6 is now the minimum required version.

    3.0.0release notes

  • The experimental remote form option includeUntouched is replaced by all.

    3.0.0release notes

  • The default polling interval is now one hour; deployment detection also occurs on data, remote, and form action responses, tab focus, and visibility changes.

    3.0.0release notes

  • Vite 8 is required; its hook filters and environment API also enable faster builds and more powerful adapters.

    3.0.0release notes

  • Query parameters beginning with x-sveltekit- are rejected.

    3.0.0release notes

Security 10

  • A malformed pathname rewritten by reroute now returns a 400 response instead of throwing.

    2.70.4, 3.1.1release notessecurity advisory

  • Route resolution no longer loads code from another origin for pathnames starting with //.

    2.70.4, 3.1.1release notesrelease notes

  • SvelteKit: Build-time server-only module import guard could fail, resulting in server secrets being statically replaced in client bundle

    3.1.1security advisory

  • SvelteKit: DoS while parsing form data from a remote functions form

    3.1.1security advisory

  • SvelteKit: Private query.batch functions could collide, producing unexpected parameter / function combinations

    3.1.1security advisory

  • SvelteKit: Protocol-relative module import during server-side route resolution allows cross-origin script execution

    2.70.4, 3.1.1security advisory

  • Path traversal is prevented when previewing prerendered pages and data on Windows.

    2.70.4, 3.0.0release notesrelease notes

  • Nested and typed underscore-prefixed remote form fields are redacted after invalid submissions.

    3.0.0release notes

  • SvelteKit: URL redirection to untrusted site via enhanced form submission

    3.0.0security advisory

  • SvelteKit : XSS via untrusted cache-control header in prerendered page

    2.70.4, 3.0.0security advisoryrelease notes

Deprecations 9

  • adapter.emulate is deprecated.

    3.2.1release notes

  • The alias option is deprecated.

    3.0.0release notes

  • builder.mkdirp is deprecated in favor of node:fs methods.

    3.0.0release notes

  • builder.rimraf is deprecated in favor of node:fs methods.

    3.0.0release notes

  • The environment modules are reinstated as deprecated aliases for $app/env/private, $app/env/public, and $app/env.

    3.0.0release notes

  • error(status, {...}) is deprecated in favor of error(status, message, {...}).

    3.0.0release notes

  • Response helpers are deprecated in favor of platform-provided alternatives.

    3.0.0release notes

  • Server is deprecated in favour of the server object written by builder.generateServerInstance.

    3.0.0release notes

  • export const snapshot is deprecated in favor of the snapshot helper.

    3.0.0release notes

New APIs and options 27

  • Remote function tracing spans now include this attribute.

    3.4.0release notes

  • Adapters can set this to true to disable SvelteKit's Node preview server when providing their own preview implementation.

    3.4.0release notes

  • CSP hash-reporting keyword is supported.

    3.1.0release notes

  • A sveltekit.endpoint span is emitted for +server handlers when server tracing is enabled.

    3.1.0release notes

  • Adapters can provide additional Vite plugins and receive the Svelte config as a function argument when adding them.

    3.0.0release notes

  • Adds $app/manifest with immutable, assets, prerendered, and routes exports.

    3.0.0release notes

  • $app/paths can be imported in service workers.

    3.0.0release notes

  • Adds the $app/service-worker module.

    3.0.0release notes

  • Adds an applyReroute helper for adapters supporting split serverless function deployments.

    3.0.0release notes

  • Adds an option to preload using the Link header.

    3.0.0release notes

  • Adds the cookies.parse method.

    3.0.0release notes

  • Function validators are supported for environment variables.

    3.0.0release notes

  • Remote form fields gain a touched() helper.

    3.0.0release notes

  • Adds a dirty() property to form fields.

    3.0.0release notes

  • The checked state can be passed as a third argument to .as('radio', ...) and .as('checkbox', ...), so inputs reset to that state after submission.

    3.0.0release notes

  • A new response option lets getRequest abort request.signal when a response closes prematurely.

    3.0.0release notes

  • Adapters can override getRequest and setResponse during vite dev and vite preview.

    3.0.0release notes

  • Page state set through goto(..., { state, persistState: true }) is preserved across reloads.

    3.0.0release notes

  • Adds shallow routing to goto; pushState and replaceState are deprecated.

    3.0.0release notes

  • Adds ManifestRoute and page and endpoint booleans to $app/manifest routes.

    3.0.0release notes

  • Custom values in page.state are supported through the transport hook.

    3.0.0release notes

  • Adds PageRouteId and EndpointRouteId to $app/types.

    3.0.0release notes

  • The font preload filter receives the project-relative source filename.

    3.0.0release notes

  • The QUERY HTTP method is supported in +server.js.

    3.0.0release notes

  • refreshAll is added, and invalidateAll is deprecated.

    3.0.0release notes

  • Remote form fields are widened to support union schemas and string enums.

    3.0.0release notes

  • Adds the snapshot helper to $app/navigation.

    3.0.0release notes

Performance 3

  • The nopush directive is omitted so Chromium can use CDN Early Hints.

    3.2.1release notes

  • In dev, SSR results of remote functions from packages are now reused during hydration.

    3.2.0release notes

  • Remote form submissions are parsed in linear time.

    3.1.1release notes

Behavior and default changes 9

  • Logs now include the remote function name and declaration file when schema validation fails.

    3.2.0release notes

  • builder.compress returns the list of compressed files.

    3.0.0release notes

  • Cookies default to secure: false during development.

    3.0.0release notes

  • Hyphens are allowed in param and matcher names.

    3.0.0release notes

  • When a query value arrives through set(), its pending request is settled in place.

    3.0.0release notes

  • All pending query promises are rejected when a query fails before first resolving with a value.

    3.0.0release notes

  • Remote function exports may use reserved words such as delete and class.

    3.0.0release notes

  • Routes can contain [ and ] using the [x+5b] and [x+5d] escapes.

    3.0.0release notes

  • Pages render over sibling endpoints that have no GET or HEAD handlers.

    3.0.0release notes

Tooling 7

  • The Vite DevTools dock is supported in dev, allowing developers to use it while developing SvelteKit applications.

    3.3.0release notes

  • Dev server logs now include clickable links to remote function invocations.

    3.2.0release notes

  • Generated files are left unchanged when their contents have not changed.

    3.1.0release notes

  • $app/tsconfig can be generated without TypeScript installed.

    3.0.0release notes

  • Adds ErrorProps to generated types.

    3.0.0release notes

  • Prerender errors are surfaced during development.

    3.0.0release notes

  • Sourcemaps are supported in production.

    3.0.0release notes

Fixes and other changes 62

  • Forked build processes now respect explicit FORCE_COLOR settings.

    3.4.0release notes

  • SvelteKit explains the missing TypeScript compiler API instead of crashing with TypeScript 7.

    3.4.0release notes

  • Forked build processes now respect NO_COLOR settings.

    3.4.0release notes

  • Non-ASCII characters display correctly in plain text error messages during development.

    3.4.0release notes

  • Trailing route groups are stripped correctly when resolving routes with search parameters or fragments.

    3.4.0release notes

  • A user-set build.cssMinify value is now respected.

    3.3.1release notes

  • Route analysis and prerendering now read environment variables after all adapter Vite config hooks have run.

    3.3.1release notes

  • Results of remote functions awaited in server load functions are no longer serialized into the page.

    3.3.1release notes

  • Pages hash their encoded bytes for the ETag and send those same bytes as the body; hashing is skipped when setHeaders sets an etag, the response is no-store, or the page has a CSP nonce.

    3.2.1release notes

  • Async load function return values are checked against App.PageData.

    3.2.1release notes

  • The crawler now finds links located after a quoted attribute value ending with a backslash.

    3.2.1release notes

  • Generated types are valid for route parameter names that start with a digit, such as [2nd].

    3.2.1release notes

  • Routes are scanned correctly on Windows when optimizing dependencies.

    3.2.1release notes

  • On start with SSR disabled, afterNavigate now sets navigation.from to null.

    3.2.0release notes

  • During hydration, afterNavigate now receives correctly populated route and params.

    3.2.0release notes

  • The result now includes assets imported through dynamic imports, remote functions and param matchers, allowing read to find them.

    3.2.0release notes

  • A request for __data.json on a missing route now receives JSON instead of the rendered error page.

    3.2.0release notes

  • Saving files during development no longer reloads unrelated server modules.

    3.2.0release notes

  • Inline assets are now read using their UTF-8 byte length.

    3.2.0release notes

  • When paths.relative is true, data requests now resolve relative paths against the page URL.

    3.2.0release notes

  • When using read, query strings and hashes in imported asset URLs are now ignored.

    3.2.0release notes

  • The original fetch is reused across dev server reloads.

    3.1.1release notes

  • Function snapshots are restored on reload when SSR is disabled.

    3.1.1release notes

  • Separate non-exported query.batch functions no longer share a batch.

    3.1.1release notes

  • Actionable errors are reported for remote modules in server-only locations.

    3.1.1release notes

  • Service worker sourcemaps are preserved when injecting env.

    3.1.1release notes

  • A non-serializable TypeScript config callback is no longer injected by default.

    3.1.1release notes

  • Deployment recovery continues when service worker updates fail.

    3.1.0release notes

  • Focus remains in the parent page when an app in an unfocused iframe starts or navigates.

    3.1.0release notes

  • MIME types for prerendered files are inferred from generated files.

    3.1.0release notes

  • Modules are no longer all treated as server-only when the project is inside a server directory.

    3.1.0release notes

  • Warnings are no longer emitted for Storybook's Vite plugins that use transformIndexHtml.

    3.1.0release notes

  • Relative imports in generated types now work with nodenext module resolution.

    3.0.1release notes

  • Dynamic $app/env/* variables are populated in contexts that do not run the dev server, such as vite-node.

    3.0.0release notes

  • $app/environment is restored as an alias for $app/env so dependencies importing it continue to work.

    3.0.0release notes

  • The error status from App.Error is read in prerender and query.live remote functions.

    3.0.0release notes

  • Server-side route resolution supports bigint params.

    3.0.0release notes

  • Cookie options are optional.

    3.0.0release notes

  • Deleted cookies are excluded from cookies.getAll(), keeping it consistent with cookies.get().

    3.0.0release notes

  • Fetch responses are no longer serialized when the request body is not a string or TypedArray.

    3.0.0release notes

  • The nearest error page renders when a form submission receives a non-ActionResult error response.

    3.0.0release notes

  • The nearest +error.svelte renders at its occupied depth when an error is thrown during rendering.

    3.0.0release notes

  • Where applicable, form field .as(...) accepts undefined values.

    3.0.0release notes

  • Form fields can be named after Object prototype properties.

    3.0.0release notes

  • form.fields.set properly handles Date objects.

    3.0.0release notes

  • Reading non-serialized set-cookie headers via getSetCookie in load no longer errors.

    3.0.0release notes

  • Global app state persists across module graph reloads.

    3.0.0release notes

  • The prerender crawler no longer hangs on unterminated unquoted attributes.

    3.0.0release notes

  • User-set preview.cors configuration is respected instead of being overridden.

    3.0.0release notes

  • Values set or refreshed from within a query during SSR are serialized into the rendered HTML.

    3.0.0release notes

  • query.live sends periodic keep-alive SSE comments to prevent idle-timeout errors.

    3.0.0release notes

  • data: protocol URLs are treated as external for redirects.

    3.0.0release notes

  • Validation checks that all remote form fields were created with form.fields.foo.as(...).

    3.0.0release notes

  • Values typed into remote form fields are coerced, and .as() defaults apply only until the field is edited.

    3.0.0release notes

  • Errors from prerendered remote responses are propagated instead of rerunning the function.

    3.0.0release notes

  • Node.js buffers returned from remote functions during SSR are serialized correctly.

    3.0.0release notes

  • RequestEvent properties are marked readonly.

    3.0.0release notes

  • Route escape sequences above ffff are decoded correctly.

    3.0.0release notes

  • Scheme-like path segments no longer cause off-site trailing-slash redirects.

    3.0.0release notes

  • User-set server.cors configuration is respected instead of being overridden.

    3.0.0release notes

  • The trusted-types policy is required only when client-side code is shipped, allowing builds where all pages have csr: false.

    3.0.0release notes

  • Paths resolve using the Vite config root option instead of process.cwd(), improving monorepo support.

    3.0.0release notes

@sveltejs/kit 2267 changes

Breaking changes 46

  • Rewrites of malformed pathnames now return a 400 response instead of throwing.

    2.70.4release notes

  • Prerendering now throws an error when a root +server.js returns a non-HTML response.

    2.65.2release notes

  • The .run() method was removed from remote queries on the client and server; use await query() directly instead.

    2.61.0release notes

  • Queries are no longer refreshed on full-page reload form submissions.

    2.60.0release notes

  • On the server, the returned promise represents adding the refresh to the map, not the time it takes to run the remote function.

    2.59.0release notes

  • Entries yielded by requested now contain arg and query instead of the validated argument.

    2.58.0release notes

  • The limit field is now required in requested, as originally intended.

    2.58.0release notes

  • Calling resolve with an external URL now throws an error.

    2.58.0release notes

  • The request now silently returns 404 in dev and preview.

    2.57.0release notes

  • Select fields that accept multiple values now use an array type.

    2.57.0release notes

  • Client-driven refreshes have been reworked, changing how query refreshes behave.

    2.56.0release notes

  • Refresh failures triggered by commands are isolated per query.

    2.56.0release notes

  • Awaiting queries outside render is disallowed.

    2.56.0release notes

  • Object keys are sorted when caching remote functions, changing cache key generation.

    2.56.0release notes

  • Removed from experimental remote form functions; use a button with the form field action instead.

    2.50.0release notes

  • Forking is now gated behind experimental.forkPreloads.

    2.49.4release notes

  • invalid must now be imported from @sveltejs/kit.

    2.48.8release notes

  • The experimental form validate() method no longer accepts the submitter option and always provides a default submitter.

    2.48.8release notes

  • The RemoteFormAllIssue type was deleted.

    2.48.5release notes

  • A path option is required when setting, deleting, or serializing cookies.

    2.0.0release notes

  • dangerZone.trackServerFetches has been removed.

    2.0.0release notes

  • __data.json files are generated as siblings to .html files.

    2.0.0release notes

  • The type for depends now requires a colon as part of the string.

    2.0.0release notes

  • Dynamic environment variables can no longer be used during prerendering and are served dynamically.

    2.0.0release notes

  • Error handling has been tightened up.

    2.0.0release notes

  • error and redirect are now commands.

    2.0.0release notes

  • The state option has been removed in favour of shallow routing.

    2.0.0release notes

  • External navigation with goto is disallowed.

    2.0.0release notes

  • A form without multipart/form-data enctype errors if it contains a file input.

    2.0.0release notes

  • Node 18.13 or newer is required.

    2.0.0release notes

  • A route fails if +page and +server have mismatched config.

    2.0.0release notes

  • A route with +page and +server fails if it is marked prerenderable.

    2.0.0release notesrelease notes

  • Path resolution has been fixed.

    2.0.0release notes

  • undefined is no longer a valid value for paths.relative.

    2.0.0release notes

  • Paths passed to preloadCode must be prefixed with the basepath.

    2.0.0release notes

  • resolvePath has been removed in favour of resolveRoute from $app/paths.

    2.0.0release notes

  • resolveRoute from $app/paths replaces resolvePath.

    2.0.0release notes

  • Shallow routing is implemented and replaces the goto state option.

    2.0.0release notes

  • Support for Svelte 3 has been dropped.

    2.0.0release notes

  • The plugin is now a peer dependency and must be installed in each project using SvelteKit.

    2.0.0release notes

  • Top-level promise awaiting has been removed.

    2.0.0release notes

  • The generated tsconfig no longer provides a baseUrl fallback.

    2.0.0release notes

  • The project upgrades to TypeScript 5; user projects default moduleResolution to bundler, while package uses NodeNext.

    2.0.0release notes

  • Deprecated callback values for use:enhance have been removed.

    2.0.0release notes

  • Vite 5.0.3 or newer is required.

    2.0.0release notes

  • vitePreprocess is no longer re-exported.

    2.0.0release notes

Security 14

New APIs and options 21

  • Remote forms expose a submitted property.

    2.69.0release notes

  • The type is now exposed for developers to use.

    2.68.0release notes

  • Adds an option for handling invalid URLs discovered while crawling during prerendering.

    2.67.0release notes

  • CSP sources support ws:, wss:, and trusted-types-eval.

    2.66.0release notes

  • Queries can now refresh other queries.

    2.65.0release notes

  • Commands can now receive File objects.

    2.64.0release notes

  • Adds explicit environment variables.

    2.63.0release notes

  • Svelte(Kit) config can now be passed via the Vite plugin.

    2.62.0release notes

  • The enhance callback now receives the form remote function instance.

    2.61.0release notes

  • Form remote function instances now have a programmatic submit method.

    2.61.0release notes

  • Adds the experimental query.live function.

    2.59.0release notes

  • Supports query.batch in requested(...).

    2.59.0release notes

  • Gains an optional third generic parameter, Validated, defaulting to Input and representing the argument type after schema validation or transformation.

    2.58.0release notes

  • Form fields can specify a default value with field.as(type, value).

    2.56.0release notes

  • Queries gain a run() method.

    2.56.0release notes

  • Adds a function to map a path back to a route ID and params.

    2.52.0release notes

  • Navigation callback targets now expose scroll positions, enabling transitions based on the destination scroll position during browser back/forward navigation.

    2.51.0release notes

  • RemoteFormIssue now includes a path field.

    2.48.5release notes

  • Adds the Request.signal property to the request.

    2.47.0release notes

  • Fine-grained invalidation of search params is supported.

    2.0.0release notes

  • untrack has been added to load.

    2.0.0release notes

Performance 2

  • Prerendered Markdown files are precompressed.

    2.66.0release notes

  • Already-loaded CSS is no longer re-loaded during server-side route resolution.

    2.49.2release notes

Behavior and default changes 19

  • Form fields are snapshotted on read.

    2.68.0release notes

  • Users are warned when boolean inputs are not made optional in their form schemas.

    2.66.0release notes

  • Pages are preferred over endpoints when prerendering.

    2.66.0release notes

  • preloadCode can now be called during initial page load.

    2.65.2release notes

  • Link prefetching is disabled on slow internet connections.

    2.61.0release notes

  • Live query instances are now async-iterable.

    2.61.0release notes

  • Remote queries can be awaited in any context, and the shared cache dedupes awaits with reactive subscribers.

    2.61.0release notes

  • submit and hidden form fields now accept numbers and booleans.

    2.60.0release notes

  • Unread validation issues now trigger a warning.

    2.60.0release notes

  • Allows plain functions as overrides in updates.

    2.59.0release notes

  • The enhance function's return type changes from void to MaybePromise<void>.

    2.58.0release notes

  • When configured, the trusted-types directive requires 'svelte-trusted-html' and, if a service worker is automatically registered, 'sveltekit-trusted-url'.

    2.57.0release notes

  • submit now returns a boolean indicating submission validity for enhanced form remote functions.

    2.57.0release notes

  • Remote function transport uses hydratable.

    2.56.0release notes

  • Error boundaries can now catch errors on the server.

    2.54.0release notes

  • Preloads are now placed before styles.

    2.51.0release notes

  • File uploads inside form remote functions are streamed, allowing form data to be accessed before large files finish uploading.

    2.49.0release notes

  • SvelteKit uses the experimental fork API when it is available.

    2.48.0release notes

  • Internal stack traces are redacted when reporting config errors.

    2.0.0release notes

Tooling 6

  • TypeScript 6.0 is supported.

    2.56.0release notes

  • Page and layout params with matchers are now type narrowed, improving type safety when working with params in $app/types, $app/state, and hooks.

    2.55.0release notes

  • SvelteKit supports Vite 8.

    2.53.0release notes

  • The generated tsconfig.json now includes the test directory alongside the existing tests entry.

    2.51.0release notes

  • Adds typescript as an optional peer dependency, affecting dependency installation and package setup.

    2.49.3release notes

  • SvelteKit HTML typings are provided.

    2.0.0release notes

Fixes and other changes 159

  • Dependencies of $app/state are no longer read eagerly during module initialization.

    2.70.3release notes

  • Type generation now detects destructured actions exports.

    2.69.3release notes

  • Type generation now detects destructured load exports.

    2.69.3release notes

  • The maximum cookie size is aligned with RFC 6265bis.

    2.69.3release notes

  • CSS URL references are now absolute when paths.relative is false.

    2.69.3release notes

  • Define values are now set on globalThis when running Vitest.

    2.69.2release notes

  • Prevents an unhandled promise rejection.

    2.69.1release notes

  • Returns undefined when only fields.branch.leaf has issues.

    2.69.0release notes

  • Form reset now clears issues and touched states.

    2.69.0release notes

  • The field prefix is stripped before an error is raised for duplicates.

    2.68.0release notes

  • Skip native_navigation when __data.json returns 404 on a static fallback page.

    2.68.0release notes

  • Warning detection ignores third-party monkeypatches to pushState and replaceState.

    2.68.0release notes

  • The reset function is called via the prototype.

    2.68.0release notes

  • The value of submit fields is set when the form is submitted.

    2.68.0release notes

  • Avoids unnecessarily overriding a user's Vite 8 codeSplitting setting.

    2.67.0release notes

  • Supports exactOptionalPropertyTypes for optional form schema fields.

    2.67.0release notes

  • Snapshots are restored after afterNavigate callbacks.

    2.66.0release notes

  • The generated tsconfig no longer sets types to ['node'], avoiding errors when @types/node is not installed.

    2.66.0release notes

  • Error pages for missing __data.json requests use correct relative asset paths.

    2.66.0release notes

  • Empty file inputs are omitted from remote form data.

    2.66.0release notes

  • Forms wait a tick before resetting.

    2.66.0release notes

  • The active element is blurred before a component update during navigation, so blur and focusout handlers run while old component data is still valid.

    2.66.0release notes

  • Preflight schemas apply correctly when chained before for.

    2.66.0release notes

  • Active for-await consumers are preserved across live-query reconnects.

    2.66.0release notes

  • Reconnect promises settle on every exit path, preventing invalidateAll() from deadlocking when a live query is offline or interrupted.

    2.66.0release notes

  • The last value is preserved when a live-query stream completes without yielding on reconnect.

    2.66.0release notes

  • The base value is available from $service-worker during development.

    2.66.0release notes

  • A root layout load() error no longer causes a blank page in SPA mode.

    2.66.0release notes

  • Unknown options from the sveltekit Vite plugin are passed through to vite-plugin-svelte.

    2.66.0release notes

  • building now resolves correctly, allowing build-time explicit environment variable validation to be avoided.

    2.65.2release notes

  • Path separators are normalized when comparing config.

    2.65.2release notes

  • Remote function failures consumed via current or error no longer cause unhandled promise rejections instead of being awaited.

    2.65.2release notes

  • Explicit dynamic public environment variables are now accessible from prerendered pages and service workers.

    2.65.2release notes

  • Base64-serialized fetch bodies are decoded before caching them for client-side replay.

    2.65.2release notes

  • Universal nodes are no longer loaded during build analysis when the app uses a hash router.

    2.65.2release notes

  • The client entry is now served correctly during development when using the pnpm global virtual store.

    2.65.2release notes

  • Transport failures preserve the HTTP status and error body instead of reporting a generic 500.

    2.65.2release notes

  • Fixes a regression in loading assets for apps using absolute paths.

    2.65.1release notes

  • With bundleStrategy: 'inline', unused bundle and stylesheet files are no longer emitted.

    2.65.1release notes

  • Queries are reset before navigating when invalidateAll is set.

    2.65.1release notes

  • Builds with a non-standard NODE_ENV no longer import Vite development client code.

    2.65.1release notes

  • The client build is skipped when all routes have CSR disabled.

    2.65.0release notes

  • Remote data is deduplicated.

    2.65.0release notes

  • Server components are no longer bundled when SSR is turned off for a route.

    2.64.0release notes

  • Ensures version is defined when importing from $app/env with explicit environment variables.

    2.63.1release notes

  • Allows importing $app/environment with a warning when explicitEnvironmentVariables is enabled.

    2.63.1release notes

  • Uses forward slashes in the generated import path on Windows.

    2.63.1release notes

  • Uses SSE for query.live.

    2.63.1release notes

  • Allows use of $app/env/public in service workers.

    2.63.0release notes

  • Running sync no longer checks for svelte.config.js first.

    2.63.0release notes

  • A placeholder tsconfig.json is generated to suppress sync-time warnings.

    2.63.0release notes

  • Preloading is fixed for anchor elements that were just previously preloaded.

    2.62.0release notes

  • The module is no longer generated when the app does not use public dynamic environment variables.

    2.62.0release notes

  • Streaming errors from load functions are caught on the client.

    2.62.0release notes

  • Multiple Set-Cookie headers are preserved on 304 responses.

    2.62.0release notes

  • Routes starting and ending with a route group are now matched correctly.

    2.61.1release notes

  • The default error page is preferred when decoding the URL pathname fails.

    2.61.0release notes

  • Binary form deserialization no longer relies on Content-Length, avoiding failures when proxies strip the header and use chunked transfer encoding.

    2.61.0release notes

  • Optional route params now support exactOptionalPropertyTypes.

    2.61.0release notes

  • Routes ending with optional parameters are allowed next to more specific routes.

    2.61.0release notes

  • True values are now correctly sent to the server for submit and hidden form fields.

    2.61.0release notes

  • Build warnings about undefined universal hooks are avoided.

    2.61.0release notes

  • Navigation is aborted after async rendering if it has become obsolete.

    2.60.0release notes

  • Fixes resolving route file paths on Windows when the path includes a drive letter.

    2.59.1release notes

  • form.fields.foo.as('checkbox', default_value) now works.

    2.59.0release notes

  • Remote forms reset to default values provided by field.as('text', defaultValue) once submitted.

    2.59.0release notes

  • Queries now always get started correctly.

    2.59.0release notes

  • The output type now unwraps Promise.

    2.59.0release notes

  • An empty call to .updates() on a command or form invocation means “don't update anything.”

    2.59.0release notes

  • Styles and fonts load before CSR starts to avoid FOUC.

    2.58.0release notes

  • Prevents a crash when nested values are nullish.

    2.58.0release notes

  • The form result is reset on redirect.

    2.58.0release notes

  • query().current, .error, .loading, and .ready now work in non-reactive contexts.

    2.58.0release notes

  • Restores correct typing for nullable array fields, including schemas using .default([]), so .as('checkbox') and similar usages work again.

    2.58.0release notes

  • Removing SSI comments no longer triggers a false positive warning about breaking Svelte hydration.

    2.58.0release notes

  • Default values are used as fallbacks.

    2.57.1release notes

  • Form typings are more permissive for union types.

    2.57.1release notes

  • Avoids an “ignored with codeSplitting” warning when using Vite 8.

    2.57.0release notes

  • Multiple remote functions can be used within one async derived.

    2.56.0release notes

  • Same-cache-key batch calls are deduplicated during SSR.

    2.56.0release notes

  • Backticks are correctly escaped when precomputing CSS.

    2.56.0release notes

  • The default Svelte 5 error.svelte file uses runes mode.

    2.56.0release notes

  • Obsolete forks are discarded before navigation finishes.

    2.56.0release notes

  • Setting paths.base in svelte.config.js no longer causes a false-positive warning about an overridden Vite base setting.

    2.56.0release notes

  • pending_count is decremented when a form callback does not call submit().

    2.56.0release notes

  • Calling .refresh on a query with no cache entry no longer requests new data.

    2.56.0release notes

  • Building the service worker with Vite 8 no longer produces an inlineDynamicImports deprecation warning.

    2.56.0release notes

  • Validation of the Svelte config file no longer emits deprecation warnings for config.kit.files.* options.

    2.54.0release notes

  • Remote functions that are not awaited in the template no longer delay processing.

    2.54.0release notes

  • resolve() now accepts pathnames with a search string and/or hash.

    2.54.0release notes

  • Remote form redirects now handle the form target attribute.

    2.54.0release notes

  • Avoids a Vite warning about the unknown codeSplitting option.

    2.53.4release notes

  • Prevents overlapping file metadata in remote functions form.

    2.53.3release notes

  • Commands are allowed in more places.

    2.53.2release notes

  • The .value() and .set(...) methods use deep partial types.

    2.53.2release notes

  • Server-rendering now handles nested form value sets correctly.

    2.53.2release notes

  • Prerender functions can use optional types.

    2.53.2release notes

  • Remote command functions can use optional types.

    2.53.2release notes

  • Remote functions receive correct URL information.

    2.53.2release notes

  • Remote query functions can use optional types.

    2.53.2release notes

  • Addresses a warning about inlineDynamicImports when using Vite 8.

    2.53.1release notes

  • Event listeners are removed when form attachment cleanup runs.

    2.53.0release notes

  • Queries refreshed in a form remote function are applied when a redirect is thrown.

    2.53.0release notes

  • Types are narrowed to follow trailing slash page settings.

    2.52.0release notes

  • Navigation to a URL-supplied anchor now respects scroll-margin.

    2.52.0release notes

  • A false-positive inner content warning is suppressed when the children prop is forwarded to a child component.

    2.51.0release notes

  • fetch now works when the URL is on the same host but outside paths.base.

    2.51.0release notes

  • Redirecting in a remote function no longer triggers handleError.

    2.51.0release notes

  • Navigation to hash links now works when a base element is present.

    2.51.0release notes

  • The injected script for hydratable now works with CSP.

    2.51.0release notes

  • Generated tsconfig.json now uses the configured value of kit.files.src.

    2.51.0release notes

  • Uses validated arguments in the batch resolver in both CSR and SSR.

    2.50.2release notes

  • Re-exports browser and dev from esm-env.

    2.50.2release notes

  • Inlined CSS now follows paths.assets and paths.relative settings and includes components that are conditionally rendered.

    2.50.2release notes

  • Prerendering now properly handles percent-encoded anchors.

    2.50.2release notes

  • Rest params are matched only when the matcher matches.

    2.50.2release notes

  • Improves the fields type for generic components.

    2.50.1release notes

  • hooks.server and hooks.universal are explicit Vite build inputs so assets imported by hook files are correctly discovered.

    2.50.1release notes

  • Preload links are updated if their href changes.

    2.50.1release notes

  • Avoids overriding Vite's default base when running Vitest 4.

    2.49.5release notes

  • Ensures URL-decoded pathnames are not mistaken for rerouted requests.

    2.49.5release notes

  • Supports the URLSearchParams.has(name, value) overload.

    2.49.4release notes

  • Instrumentation is supported when running vite preview.

    2.49.4release notes

  • Avoids a false-positive Vite config overridden warning when using Vitest 4.

    2.49.3release notes

  • Shared memory is correctly handled when decoding binary form data.

    2.49.2release notes

  • The instrumentation file import is correctly posixified on Windows.

    2.49.2release notes

  • Fixes a TypeError when calling response.clone() in page load.

    2.49.1release notes

  • Suppresses state_referenced_locally warnings in .svelte-kit/generated/root.svelte.

    2.49.1release notes

  • Hash-based apps can now be hosted from files other than index.html.

    2.48.7release notes

  • Root-level issues can now be accessed in schema-less forms.

    2.48.7release notes

  • Multiple server-timing headers are now allowed.

    2.48.7release notes

  • Improves the accuracy of the output types.

    2.48.6release notes

  • Client and universal hooks are treated as entrypoints when detecting illegal server imports.

    2.48.6release notes

  • Prevents type errors when the optional dependency is not installed.

    2.48.6release notes

  • Corrects .set and .refresh behavior in commands.

    2.48.6release notes

  • A route no longer uses a fork belonging to an unrelated route.

    2.48.6release notes

  • Preserves this when invoking the validator.

    2.48.6release notes

  • Issues are cleared when validation passes.

    2.48.6release notes

  • In dev, SvelteKit waits an extra microtask before calling $_init_$.

    2.48.5release notes

  • SvelteKit discards the existing preload fork before creating a new one.

    2.48.5release notes

  • The prerender cache now works, including in development.

    2.48.4release notes

  • The promise implementation now properly allows chaining.

    2.48.4release notes

  • Fixes the callback not running after hydration when experimental async is enabled.

    2.48.3release notes

  • Exposes issue.path in .allIssues().

    2.48.3release notes

  • Includes the hash when resolve is used with hash routing enabled.

    2.48.3release notes

  • Calls the Snapshot restore method after reload when experimental async is enabled.

    2.48.3release notes

  • The DOM is updated before navigate callbacks run.

    2.48.2release notes

  • Navigation now awaits settled instead of tick.

    2.48.0release notes

  • Avoids hanging when error() is used while streaming promises from a server load function.

    2.47.3release notes

  • Fixes the type for recursive or unknown schemas.

    2.47.3release notes

  • Updates the overload so the invalid type is set to the schema input type.

    2.47.2release notes

  • Fixes streamed promises failing to resolve when another load function returns a fast-resolving promise.

    2.47.2release notes

  • read can now be used at the top level of remote function files.

    2.47.1release notes

  • Remote files generation is more robust.

    2.47.1release notes

  • Resolves remote module syntax errors involving trailing expressions.

    2.47.0release notes

  • The fail method and ActionFailure type have been adjusted.

    2.0.0release notes

  • Invalid resources are reset after a successful invalidation.

    2.0.0release notes

  • Optional parameters are prerendered as empty when entries contains '*'.

    2.0.0release notes

  • Route config is resolved correctly.

    2.0.0release notes