SvelteKit 3 is a major, breaking upgrade that reorganizes types and runtime behavior while raising platform requirements. It mandates Node 22 (22.17+), Vite 8 (>=8.0.12), TypeScript 6, Svelte 5.56.4, and @sveltejs/vite-plugin-svelte v7. Many public APIs and types are moved or renamed (separating hook, env, params, navigation, form, and state types into new packages and $app modules), #lib replaces $lib, and several legacy features and flags were removed (polyfills, deprecated pragma headers, preloadStrategy, files.lib, etc.). Cookie handling upgraded to cookie v2 (ASCII-only names and default path '/'), page.url became immutable at the type level, server-only directory semantics changed, goto options simplified (reset replaces noScroll/keepFocus), form action behavior and refresh semantics were altered, and a long list of other breaking adjustments address validation, routing, response handling, adapters, and manifest generation.
Beyond breaking changes, the update adds developer-facing features and quality-of-life improvements: adapters can contribute Vite plugins, $app/manifest exposes immutable/assets/prerendered/routes info, production sourcemap support, shallow routing, improved error and response logging, builder.compress now returns compressed file lists, and service-worker-related modules and registrations were refined. It also improves form validation and environment-variable validators, reinstitutes deprecated env aliases for compatibility, better tsconfig validation and monorepo path resolution, supports the QUERY HTTP method in +server, and enhances deployment detection and page state persistence.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.