NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #3628 most downloaded on npm
Last release 1 months ago
02 Sep 2026
Release timing varies
gaps range from 1 weeks to 6 months
Most releases are documented
notes for 51 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
207 releases · first in 2015
experimental : Handle non-string params for isActive - by @posva (92cfd)
false in EditableTreeNode (#2752) (8e2e145)typeof useRoute in a type context (#2759) (7a4c8ea)json5 and yaml with confbox (#2769) (aab2876)defineParamParser and
defineParamParserRaw. They should cover more use cases in a more
intuitive way. Feedback is welcome. See
https://router.vuejs.org/experimental/param-parsers.htmlOne column per quarter.
Prevent race condition dev-only error - by @meihao550 in #2789 (d2b87)
typeof useRoute in a type context - by @Anoesj in #2759 (7a4c8)json5 and yaml with confbox - by @danielroe in #2769 (aab28)Add helpful diagnostics - by @posva in #2737 (628fe)
Typed definePage params.path - by @posva in #2716 (d65de)
Upgrade to babel 8 - by @posva (8d3e6)
defineParamParser() more intuitive - by @posva (8715b)@vue/devtools-api - by @posva (87c3a)params: {} workaround in discarded params warning - by @posva and shanliuling in #2689 (c2b13)@vue/language-core import - by @danielroe in #2710 (8af50)@vue/language-core import (#2710) (8af50c9)defineParamParser() more intuitive (8715b21)params: {} workaround in discarded params warning (#2689) (c2b13c6), closes #1617@vue/devtools-api (87c3aff)param-parsers: the new experimental defineParamParser() is simpler and
internally handles arrays and nullish values, simplifying the writing of param
parsers:
export const parser = defineParamParser<Date>({
get: value => {
const asDate = new Date(value)
if (Number.isNaN(asDate.getTime())) {
miss(`Invalid date: "${value}"`)
}
return asDate
},
set: value => value.toISOString(),
})
Setting the first type param (here Date) is all you need now.
Missing closing quote in generated import - by @zjy040525 and @posva in #2688 (32f78)
Enable standard schema param parsers - by @posva (ea8e3)
Avoid iterator helpers for Node 20 compat - by @cwandev in #2635 (47130)
Add reroute() and deprecate NavigationResult - by @posva (308db)
ts.getTokenPosOfNode instead of node.getStart (#2630) (0b0504b)miss() now throws the MatchMiss error internally instead of returning it. If you were using throw miss(), replace it with just miss(). This change prevents silently swallowing misses when forgetting to throw and hides the fact that this is implemented through a class, making it an implementation detail. Most users won't be affected as this only impacts custom matchers using the experimental route resolver API. Also renames MatchMiss export to _MatchMiss (internal).Remove devtools from iife build - by @posva (58c03)
volar : Make typed plugin work with vue-tsc - by @peter50216 in #2607 (7845e)
Vue Router 5 merges unplugin-vue-router into the core package. See the migration guide for instructions on how to upgrade from unplugin-vue-router to Vue Router 5.
required: true to their query params definition to make them required and miss a match if not provided in a location.Vue Router 5 merges unplugin-vue-router into the core package. It has no breaking changes itself, so you should be able to upgrade it no matter if you use unplugin-vue-router or Vue Router 4 without file-based routing, and everything should just work. If not, please open an issue!
[!NOTE] If you are not using unplugin-vue-router, there are no breaking changes affecting you
Vue Router 5 is a _boring_ release, it merges unplugin-vue-router into the core package with no breaking changes. The only exception is that the _iife…
Vue Router 5 is a boring release, it merges unplugin-vue-router into the core package with no breaking changes. The only exception is that the iife build no longer includes @vue/devtools-api because it has been upgraded to v8 and does not expose an IIFE build itself. You can track that change in this issue. See the migration guide for instructions on how to upgrade from unplugin-vue-router to Vue Router 5.
Runtime error on missing param parsers - by @posva (26e30)
experimental: Query params are optional by default - by @posva (7f000)
Vue Router 5 merges unplugin-vue-router into the core package. It has no breaking changes itself, so you should be able to upgrade it no matter if you…
Vue Router 5 merges unplugin-vue-router into the core package. It has no breaking changes itself, so you should be able to upgrade it no matter if you use unplugin-vue-router or Vue Router 4 without file-based routing, and everything should just work. If not, please open an issue!
[!NOTE] If you are not using unplugin-vue-router, there are no breaking changes affecting you
If you're already using unplugin-vue-router, migration is mostly import changes.
This is the TLDR version of the steps below:
unplugin-vue-router dependencyvue-router to v5unplugin-vue-router/vite → vue-router/viteunplugin-vue-router/data-loaders/* → vue-router/experimentalunplugin-vue-router → vue-router/unpluginunplugin-vue-router/volar/* → vue-router/volar/*unplugin-vue-router/client from tsconfig / env.d.tspnpm remove unplugin-vue-router
pnpm update vue-router@5
Vite plugin:
// Before
import VueRouter from 'unplugin-vue-router/vite'
// After
import VueRouter from 'vue-router/vite'
Other build tools (Webpack, Rollup, esbuild) import from vue-router/unplugin:
import VueRouter from 'vue-router/unplugin'
VueRouter.webpack({
/* ... */
})
VueRouter.rollup({
/* ... */
})
// etc.
Data loaders:
// Before
import { defineBasicLoader } from 'unplugin-vue-router/data-loaders/basic'
import { defineColadaLoader } from 'unplugin-vue-router/data-loaders/pinia-colada'
import { DataLoaderPlugin } from 'unplugin-vue-router/data-loaders'
// After
import { defineBasicLoader, DataLoaderPlugin } from 'vue-router/experimental'
import { defineColadaLoader } from 'vue-router/experimental/pinia-colada'
Unplugin utilities (for custom integrations):
// Before
import {
VueRouterAutoImports,
EditableTreeNode,
createTreeNodeValue,
createRoutesContext,
getFileBasedRouteName,
getPascalCaseRouteName,
} from 'unplugin-vue-router'
// After
import {
VueRouterAutoImports,
EditableTreeNode,
createTreeNodeValue,
createRoutesContext,
getFileBasedRouteName,
getPascalCaseRouteName,
} from 'vue-router/unplugin'
Types:
// Before
import type { Options, EditableTreeNode } from 'unplugin-vue-router'
// After
import type { Options, EditableTreeNode } from 'vue-router/unplugin'
Volar plugins:
// Before (tsconfig.json)
{
"compilerOptions": {
// needed for the volar plugin
"rootDir": "."
},
"vueCompilerOptions": {
"plugins": [
"unplugin-vue-router/volar/sfc-typed-router",
"unplugin-vue-router/volar/sfc-route-blocks"
]
}
}
// After
{
"compilerOptions": {
// needed for the volar plugin
"rootDir": "."
},
"vueCompilerOptions": {
"plugins": [
"vue-router/volar/sfc-typed-router",
"vue-router/volar/sfc-route-blocks"
]
}
}
These enable automatic typing useRoute() when using file-based routing:
<!-- src/pages/users/[id].vue -->
<script setup lang="ts">
// Before: had to pass route name for typing
const route = useRoute('/users/[id]')
// After: automatically typed based on file location!
const route = useRoute()
route.params.id // ✅ typed as string
</script>
<template>
<!-- $route is also automatically typed -->
<p>User ID: {{ $route.params.id }}</p>
</template>
Remove the old client types reference. These were either added to an env.d.ts:
-/// <reference types="unplugin-vue-router/client" />
or to your tsconfig.json:
// Before
{
"include": ["./typed-router.d.ts", "unplugin-vue-router/client"]
}
// After
{
"include": ["./typed-router.d.ts"]
}
It's also recommended to remove the ./typed-router.d.ts from your tsconfig.json and place it inside src/, as it's automatically included by most setups:
// vite.config.ts
export default defineConfig({
plugins: [
VueRouter({
dts: 'src/routes.d.ts',
}),
Vue(),
],
})
This will be the default in a future version.
Handle redirect types - by @posva (92efb)
Please refer to CHANGELOG.md for details.
Please refer to CHANGELOG.md for details.
Please refer to CHANGELOG.md for details.
Please refer to CHANGELOG.md for details.
Please refer to CHANGELOG.md for details.
Add back dist/vue-router.esm-bundler.js for better retro compatibility with existing wrappers. Note this will be removed in next major and a warning has been added. See #2569
Please refer to CHANGELOG.md for details.
Please refer to CHANGELOG.md for details.
This release refactors the build to use tsup. Please report any issue you may find regarding to types or incorrectly unresolved exports
There is a new vue-router/experimental export which is used mainly by unplugin-vue-router with the new custom resolvers that bring a smaller router runtime, faster route matching, custom param types and matching on query parameters. There is still some work to do so the API is still experimental and may change in future releases. If you want to give it a try, check the experimental playground in unplugin-vue-router. If you use file based routing, this will be a transparent upgrade for you (in the future). Currently it still lacks a couple of features like alias and dynamic routing.
vue-router/experimental. Meant to be used in combination with unplugin-vue-router for the moment. Still lacking documentationPlease refer to CHANGELOG.md for details.
Please refer to CHANGELOG.md for details.
Please refer to CHANGELOG.md for details.
Please refer to CHANGELOG.md for details.
Please refer to CHANGELOG.md for details.
Please refer to CHANGELOG.md for details.
Please refer to CHANGELOG.md for details.
Please refer to CHANGELOG.md for details.
Please refer to CHANGELOG.md for details.
Please refer to CHANGELOG.md for details.
Please refer to CHANGELOG.md for details.
Please refer to CHANGELOG.md for details.
Please refer to CHANGELOG.md for details.
Please refer to CHANGELOG.md for details.
Please refer to CHANGELOG.md for details.
Please refer to CHANGELOG.md for details.
Please refer to CHANGELOG.md for details.
Please refer to CHANGELOG.md for details.
Please refer to CHANGELOG.md for details.
Please refer to CHANGELOG.md for details.
Please refer to CHANGELOG.md for details.
Please refer to CHANGELOG.md for details.
Please refer to CHANGELOG.md for details.
Please refer to CHANGELOG.md for details.
Please refer to CHANGELOG.md for details.
Please refer to CHANGELOG.md for details.
Please refer to CHANGELOG.md for details.
Please refer to CHANGELOG.md for details.
addRoute cannot find the parent (#2157) (6377083)Please refer to CHANGELOG.md for details.
Please refer to CHANGELOG.md for details.
Nothing published for this version
Nothing published for this version
Please refer to CHANGELOG.md for details.
Please refer to CHANGELOG.md for details.
Please refer to CHANGELOG.md for details.
Please refer to CHANGELOG.md for details.
Please refer to CHANGELOG.md for details.
Please refer to CHANGELOG.md for details.
Please refer to CHANGELOG.md for details.
Please refer to CHANGELOG.md for details.
Please refer to CHANGELOG.md for details.
Please refer to CHANGELOG.md for details.
Please refer to CHANGELOG.md for details.
Please refer to CHANGELOG.md for details.
Please refer to CHANGELOG.md for details.
Please refer to CHANGELOG.md for details.
Please refer to CHANGELOG.md for details.
Please refer to CHANGELOG.md for details.
Please refer to CHANGELOG.md for details.
Please refer to CHANGELOG.md for details.
Please refer to CHANGELOG.md for details.
Please refer to CHANGELOG.md for details.
Please refer to CHANGELOG.md for details.
We are excited to announce the release of Vue Router 4.1 with a few new interesting features, better support for Node ESM and no breaking changes.
We are excited to announce the release of Vue Router 4.1 with a few new interesting features, better support for Node ESM and no breaking changes.
component/components option in routesIt's now possible to completely omit the component option when defining routes with children. While nested routes are about defining layouts, they are also directly connected to a path and users often found themselves defining a pass through component that would just render a <RouterView> component to reuse the path structure. You can now simplify this to:
- import { RouterView } from 'vue-router'
- import { h } from 'vue'
-
const routes = [
{
path: '/admin',
- component: () => h(RouterView),
children: [
{ path: 'users', component: AdminUserList },
{ path: 'users/:id', component: AdminUserDetails },
],
},
]
In other words, you can now nest paths without having to define a component.
Passing History State through router.push() has been implemented and used by the router since its version 4.0 but hasn't been exposed as a public API until now. This enables passing a state property when calling router.push() or router.replace(). This is useful to pass global state to be associated with the history entry that cannot be shared by copying the URL. One common example of this are Modals:
// go to /users/24 but show a modal instead
router.push({ name: 'UserDetail', params: { id: 24 } state: { backgroundView: ... } })
To see a full example, check the modal e2e test, it has been updated to use the state property.
It's worth noting this shouldn't be used to pass fetched data or complex objects such as classes because of type and size limitations. Check the History State documentation for more information about the state property.
Given the nature of the <RouterView>'s route prop, there is also a new function loadRouteLocation() that can be used on a resolved route location to load a route with lazy loading:
import { loadRouteLocation } from 'vue-router'
const loadedRoute = await loadRouteLocation(router.resolve('/users/24'))
In v4.1 we were initially planning to introduce types to automatically detect the params from a path property, creating autocomplete and type safety in router.push() and <RouterLink>'s to prop. It was implemented but also turned out to be extremely slow after ~50 routes due to the nature of the types relying on nesting and complex unions. Instead, we are introducing a build plugin to generate the types of the routes for you based your file structure. This is similar to Nuxt and Vite Plugin Pages but with full type support (similar to nuxt-typed-router) while allowing you to keep using the exact same API, just with Autocompletion and typing hints 😄. The plugin currently supports Vite, Webpack (with some caveats), and rollup and it's currently experimental to gather feedback from the community and build a flexible solution. We hope to release a stable version in the following months.
Check out the plugin GitHub repository for installation instructions and documentation.
Here are some other examples of how much this plugin can improves your developer experience:
We now expose a few extra entry points for Node but kept the old ones as well to prevent any disruption to the existing users. You can find more information about this in the corresponding pull request.
Please refer to CHANGELOG.md for details.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →