npm / @tanstack/vue-router
@tanstack/vue-router
What changed in @tanstack/vue-router 1, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-15.
6 breaking4 performance1 behavior and defaults20 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@tanstack/vue-router 131 changes
Breaking changes 6
The internal helper is no longer exported.
The internal helper is no longer exported.
Navigation and redirect destinations are validated; ambiguous relative URLs stay on the current origin, and configured origins must already be normalized.
Vue error boundaries preserve falsy thrown values, and boundary error components and onCatch callbacks now receive errors typed as unknown. Narrow errors before reading message or stack.
Framework links no longer use a prebuilt-location argument; client preload locations are built on demand.
Active route components stay mounted by default when route params change.
Performance 4
Vue Links reuse the router's built destination across navigations and derive their state through fewer reactive nodes.
Link reduces bundle size by sharing active-path checks and resolving only the selected active or inactive props, while avoiding unnecessary class/style allocations.
An unnecessary match Fragment is removed to reduce VNode allocation and transient JIT compilation memory while preserving route content and scroll restoration.
Vue links share normalized pathname comparisons to reduce bundle size.
Behavior and default changes 1
This setting is initialization-only: configure it when creating the router. Changing allowed characters requires a new router instance.
Fixes and other changes 20
Links for routes left by a pending navigation skip deriving the destination location, and clicks and preloads follow the displayed href. buildLocation builds mask and routeMasks locations from the same _fromLocation as the destination.
Pending link preload timers are canceled when navigation starts, avoiding redundant preloading while the destination is loading.
Skips unused Link preload cleanup when preloading is disabled.
Ignores queued viewport notifications after their effect has been cleaned up.
Router requests whose Accept header allows neither text/html nor */* now receive 406 Not Acceptable instead of 500.
Preserves native form HTTP redirects, route error handling, and masks for document redirects.
Prerender requests and output paths are constrained.
Explicit redirect Location headers are honored before route options are checked.
Redirect headers no longer appear in serialized server function response bodies.
Shared loader redirects retain per-navigation destinations.
Vue link state refreshes when destinations become internal.
Absolute URL checks in links, navigation, redirects, and build configuration use URL.canParse, with a URL constructor fallback for older browsers.
Successful not-found matches remain terminal shared boundaries during client navigation, preserving route context while the destination loads.
Structural descendants below error and not-found boundaries are excluded from lifecycle callbacks; lifecycle membership is preserved through invalidation, hydration, background reloads, and superseded navigation publication.
The route-scoped API now forwards shouldThrow and preserves optional return types when shouldThrow is false.
The route-scoped API now forwards shouldThrow and preserves optional return types when shouldThrow is false.
The route-scoped API now forwards shouldThrow and preserves optional return types when shouldThrow is false.
Context is preserved during reloads.
Pending UI is preserved across retained routes.
Resolved lazy route components are reused when revisiting code-split routes, preventing unnecessary pending UI.