0.19.2 (2025-12-29)
- allow kebab-case param parsers (da618d5), closes #774
- compare to correct parent regexp when skipping (82bd0e8), closes #775
0.19.1 (2025-12-15)
- colada: avoid tracking loaders effect a0a7a2f, closes #744
- encode path 7e8027b
- loaders: avoids Uncaught PromiseRejection if the signal is thrown 166ffe0, closes #768
- only encode when needed afaf086
- update VLS context type argumentation (#769) 583509f, closes #769
- x+hh for special characters df29c44, closes #576
0.19.0 (2025-12-04)
- colada: always avoid double reload (70efd16)
- colada: avoid tracking loader effect scope (e5d5c23), closes #744
- loaders: throw returned NavigationResult from parent loaders (8134519), closes #584
- warn: do not warn on known errors (#678) (e208778)
- loaders: the initial value of error is now null (875243f)
- loaders: the initial value of errors as undefined was a mistake (differently from data which does start as undefined). The initial state of a loader should be pending, data: undefined, and error: null
0.18.0 (2025-11-28)
- use the official virtual prefix \0 (c85dd85), closes #608
- warn: catch non exposed loaders through NavigationResult (191681e), closes #759
0.17.2 (2025-11-27)
0.17.1 (2025-11-21)
If you are using the Volar plugin to automatically type useRoute(), please update to this version and set your rootDir option in your tsconfig.json to match your project root. This will ensure the plugin works correctly.
- volar: use rootDir (ca89fcf)
0.17.0 (2025-11-14)
- remove deprecated export vue-router/auto (9c3e4f2)
-
This export was creating multiple issues and was not needed. It was deprecated long time ago and has now been removed. In most cases you should be able to just import from
vue-routerinstead, but other exports must be adapted:-
definePageshouldn't be imported, it's a macro with no runtime -
DataLoaderPluginandNavigationResultmust be imported fromunplugin-vue-router/data-loaders -
defineBasicLoadermust be imported fromunplugin-vue-router/data-loaders/basic -
defineColadaLoadermust be imported fromunplugin-vue-router/data-loaders/pinia-coladaHere is the old declaration of
vue-router/autofor reference:
declare module 'vue-router/auto' { // reexport all types that are not augmented by unplugin-vue-router export * from 'vue-router' export { definePage } from 'unplugin-vue-router/runtime' // Experimental Data Fetching export { DataLoaderPlugin, NavigationResult, } from 'unplugin-vue-router/data-loaders' }
-
0.16.2 (2025-11-14)
- experimental: connecting slash with optional params (e7d78cb)
- experimental: keep non matchable records with name: false (980143d)
- hmr: invalidate all modules related to pages on update (2fdcbde), closes #748
- improve tree log (474d12f)
0.16.1 (2025-10-30)
- experimental: reuse parent path for index routes (332a89c)
0.16.0 (2025-10-14)
This new version requires Vue router 4.6.0 or higher. It includes support for the new experimental custom resolvers by setting experimental.paramParsers: true.
- escape regex in paths (cf167c0)
- gracefully handle syntax errors in definePage (bc5a060), closes #692 #691
- remove componentless routes from
routesin_RouteFileInfoMap(#686) (f4a845a) - setup watchers only when needed (3e247d7)
- stable order file info map (e9a1ad2), closes #688
- add
unplugin-vue-router/rolldownexport (#725) (1686681) - add new experimental option (cbd902a)
- allow function in default (7d8ecd0)
- avoid invalid dts with invalid param (8f7d4d2), closes #706
- cleaner git diffs (#698) (028c037)
- ensure consistent non trailing slash (aed8bfc)
- extract param parsers from definePage (04a5075)
- fix "Unused import specifier" warning in WebStorm (969ae2c)
- handle negative default query params (73b1d3d)
- handle query types (4b750fb)
- handle splats (577410b)
- parse custom param (c37b79f)
- remove empty parents from routes (9d91f3f)
- sorting of experimental resolver (caecce5)
- support custom params folder (48c75fd)
- support meta properties (702a122)
- support static paths for resolver (b506d6f)
- type custom params (ec00188)
- types + runtime of param parsers on path (00fa3b2)
- warn possible bug (b4b4332)
0.15.0 (2025-08-04)
- remove empty string names from the route map (45de2b7)
- allow removing a route by setting its name to
false(d754601) - automatically type
useRoute()with a volar plugin (#609) (a8a0dcc)
0.14.0 (2025-06-29)
- data-loaders: avoid exporting data loaders in runtime (264f338), closes #663
- stable order in children (d0fc9f3), closes #664
- data-loaders: Data loader features must be imported from
unplugin-vue-router/data-loaders. They were accidentally exposed through runtime but this was never documented. Your IDE might have added auto imports automatically and removing this will avoid future issues. You simply need to replace missing imports.
0.13.0 (2025-06-29)
- define-page: support JSX (#514) (e34ff23)
- extendRoutes: allow relative path overrides in
EditableTreeNode(#519) (93a977a) - types: add children route names to generated
RouteNamedMap(#602) (f2fb721)
- extendRoutes: If you were relying on EditableTreeNode's
path
returning a full path, you must now readfullPathinstead.
Otherwise, this change should be more intuitive as it allows setting a
relative path.
0.12.0 (2025-03-04)
- data-loaders: allow nested loaders to run on invalidation (0665635), closes #583
- unpin
unplugin(#592) (89daf52)
0.11.2 (2025-01-26)
0.11.1 (2025-01-21)
0.11.0 (2025-01-21)
- resolve tree node value options (1bf080a)
- add route groups (#549) (e9bbf05)
- hmr: improve Vite HMR implementation (#502) (68bb979)
- loaders: add useIsDataLoading hook (#559) (9c69f54)
- mkdir if parent dir does not exists (#516) (6bea24a)
0.10.9 (2024-12-04)
- warn: better message (a55bc53)
- loaders: ensure loads when a navigation is missed (b799598), closes #495
- loaders: make data possibly undefined in some cases(#506) (10112a0)
- upgrade support for pinia colada 0.13.0 (b01dce4)
- data-loaders: adapt colada to support always defined data (a1cda5d)
- data-loaders: allow
datato always be defined (7cf7796), closes #319 - data-loaders: allow default type for errors (5ec4076)
- loaders: nuxt temp workaround (7763619)
- support vite 6 (b1c4f6c)
- data-loaders: The default type for
erroris nowError. - data-loaders: Based on the
optionspassed to adefineLoader()function, thedatawill now be possiblyundefined. This enables a more convenient typing - data-loaders:: The
DataLoaderPluginmust be imported fromunplugin-vue-router/data-loadersinstead ofunplugin-vue-router/runtime.
0.10.8 (2024-09-08)
- loaders: allow errors as a function (df80b28)
- loaders: allow plain value in colada loader key (646e5bf)
- loaders: avoid warning during ssr (99d7b0b)
- loaders: warn incorrect query usage (e43c5f5)
0.10.7 (2024-08-17)
- loaders: reset context in ssr scenarios (4ea4b8c)
0.10.6 (2024-08-15)
- loaders: remove default value for experimental (8773c96)
0.10.5 (2024-08-15)
- loaders: change experimental option to match only specific folders (f01cddd)
0.10.4 (2024-08-14)
- experimental auto export of data loaders (16af831)
0.10.3 (2024-08-12)
- upgrade to @pinia/colada 0.8.0 (c372b14)
0.10.2 (2024-07-30)
0.10.1 (2024-07-22)
0.10.0 (2024-06-21)
- types: use native vue-router types (5c1b6c3)
- allow imported values in definePage (a113a2d), closes #317
- handle hmr for pages (4925e7e), closes #292 #404
- hmr: reload if cannot update (6044b94)
- make
definePage()globally available (7a57597) - support TS in definePage (4fbff23), closes #57 #238
This version requires vue-router@4.4.0 or higher. The unplugin-vue-router/types no longer export all of the generic types from vue-router. Instead, import them directly from vue-router.
0.9.1 (2024-06-07)
0.9.0 (2024-05-28)
- move extension handling outside of tree (85d8472), closes #400
- remove wrong error log during HMR (c511082)
- require explicit
routesimport to avoid cyclic imports (63788f6), closes #132
- pkg: migrate package to type=module (f1e4ca5)
createRouter()now requires the explicitrouterproperty to be set and imported:
import { createRouter, createWebHistory } from 'vue-router/auto'
+import { routes } from 'vue-router/auto-routes'
createRouter({
history: createWebHistory(),
+ routes
})This also means that runtime extendRoutes() option is not needed. It
has been deprecated and will be removed in the next major release.
TreeandPrefixTreeinsert method expects a path without the file extension. They also expect the fullpath of the file as a second argument (it used to be optional). This aligns better with their responsibility as they shouldn't be trimming the extension like they used to.
// replace
tree.insert('file.vue')
// with
tree.insert('file', resolve('file.vue'))This shouldn't affect most users as the Tree implementation is used internally to represent the folder structure.
- pkg: The package is now of
"type": "module". It shouldn't break anything for users but this is just in case, we all know how fragile this js ecosystem is sometimes...
0.8.8 (2024-05-22)
- watch all extensions not just root (74ac22b)
0.8.7 (2024-05-20)
- apply definePage in named pages (bd7d5b1), closes #383
- correctly trim extensions from routesFolder (b8a9473), closes #274
- add an option to disable file watching (#387) (13f93fc)
- add component alias to EditableTreeNode (fc8ae27)
0.8.6 (2024-04-12)
- data-loaders: tracked properties with an object in key (58aa516)
0.8.5 (2024-03-14)
0.8.4 (2024-02-24)
This patch contains the necessary fixes to allow importing the data loaders. However, they cannot be imported from vue-router/auto nor from unplugin-vue-router/runtime. Instead, they should be imported from unplugin-vue-router/data-loaders/.... This is needed as some of the loaders depends on extra packages that not all users have installed. At the moment, there are two data loaders
unplugin-vue-router/data-loaders/basic: https://uvr.esm.is/data-loaders/basic/unplugin-vue-router/data-loaders/pinia-colada: https://uvr.esm.is/data-loaders/colada/
- allow untyped router with data loaders (51f7d55)
- build: externalize libs (e55d735)
- remove the need to install @pinia/colada (8d45669)
- types: externalize uvr/types (ee9a2a3), closes #322
0.8.3 (2024-02-22)
0.8.2 (2024-02-22)
0.8.1 (2024-02-22)
- upgrade peer dep on vue-router to 4.3.0 (746ad8f)
0.8.0 (2024-02-22)
Based on the feedback of the RFC, the Data Loaders have been redesigned from the ground up and are now way more flexible and powerful. As a result, if you were using the experimental data loaders, make sure to check the list of breaking changes and the new RFC at https://uvr.esm.is/rfcs/data-loaders. We are looking for early testers and feedback!
For people using the file-based routing, you now need to add unplugin-vue-router/client to the types property of your tsconfig. See setup for an example.
- allow errors outside of navigation (ae37a8e)
- avoid uncatchable rejection (fa0c794)
- delay setting the error (3d341ae)
- discard loads from canceled navigations (aac66c1), closes posva/unplugin-vue-router#200
- router.push types (98cb17b)
- run nested loaders once when used across places (73a6cc5)
- types: correct types in navigation guards (3f01155)
- types: correctly extend client (d226cf9)
- types: remove null from non raw star param (0b71ad5)
- types: restrict what can be imported from the package (8748644), closes #289
- types: use
vue-router/auto-routes(2dc0446) - use single alias for reused components on different paths (1544363)
- rename
pendingtoisLoading(9502751) - refactor!: remove deprecated APIs (0415b9e)
- refactor(data-loaders)!: rewrite of data loaders (f0b7b58)
- refactor!: remove
setupLoaderGuard(8094f62)
- add pinia colada properties (63a768f)
- commit option (56b2a4d), closes posva/unplugin-vue-router#201
- data-fetching: add server option (d4d2f46)
- data-loaders: abort the signal for old pending locations (afabb47)
- data-loaders: add abort signal to navigation (a175fa7)
- data-loaders: allow changing the navigation result (7a7da74)
- data-loaders: pass the signal to the loader (85d0494)
- handle thrown errors (2e38544)
- inject in nested loaders (b0aa0b3)
- loaders: thrown navigation results take precedence (2aaaf56)
- return a promise of data only (d2dda40)
- run loaders with access to global inject and provide (9d95e27)
- track used params (b2ae763)
- compute params once (322f220)
- use a shallowRef for data (aae0c70)
- use for of instead of forEach (1635745)
-
Remove the deprecated APIs:
-
createPrefixTree()->new PrefixTree() -
VueRouterExports->VueRouterAutoImports -
Data Loaders have been redesigned to be more flexible and account for other libraries. Notably, the caching behavior has been moved out of the basic loader to an extended one pinia-colada and the basic loader has no cache. All of the pending bugs have also been fixed. I recommend you to give the RFC examples a new read to get setup: https://uvr.esm.is/data-loaders/rfc. Most of the changes are simplifying things by removing them. Here is a list of the breaking changes to simplify migration:
- The
dataFetchingoption is no longer needed. - Manual work needed to add loaders with
HasDataLoaderMetahas been removed. It is just no longer needed. Loaders are picked up from lazy loaded components and must otherwise be directly added to ameta.loadersarray. See the example at https://uvr.esm.is/data-loaders/rfc.html#basic-example - The function
setupDataFetchingGuardhas been replaced with a Vue Plugin. See https://uvr.esm.is/data-loaders/rfc.html#data-loader-setup for details. - If you were relying on
cacheTime, use thestaleTimeoption in the newdefineColadaLoader()based off @pinia/colada - To reduce the dependency on file-based router, things have been
refactored and none of the defineLoader functions are automatically
imported anymore. You can add them yourself to the list of auto
imports, or import them from
unplugin-vue-router/data-loaders/.... The good news is you no longer need to use the plugin in order to benefit from the data loaders; they can be imported even if you don't want file-based routing.
If you find missing information or improvements, please open a Pull Request to improve the
CHANGELOG.md.- The navigation guard is replaced in favor of a Vue plugin:
Replace
import { setupLoaderGuard } from 'vue-router/auto' setupLoaderGuard({ router, app })
with
import { DataLoaderPlugin } from 'vue-router/auto' app.use(DataLoaderPlugin, { router })
vue-router/auto/routesbecomesvue-router/auto-routes. This change was necessary to improve compatibility with TypeScript and other tools in the ecosystem. Most of the time you don't need to use this path but if you were using it, replace it:
- import { } from 'vue-router/auto/routes' + import { } from 'vue-router/auto-routes'
-
Data Loaders now return an
isLoadingproperty instead ofpending. This aligns better with the wording of Data Loaders being in a loading state rather than pending, which can have more meanings. -
You know need to add
unplugin-vue-router/clientto thetypesproperty of your tsconfig. See setup for an example. This file contains the augmentation of thevue-router/automodule that was previously intyped-router.d.ts. You also need to set themodeResolutiontoBundlerin yourtsconfig.json. -
the existing
defineLoaderis being replaced by a basic loader without cache. The version with cache will be implemented by adding a library that properly handles the caching. This new strategy will also enable other integrations like VueFire, Apollo, and custom ones. Keep an eye (subscribe) to the RFC for news and to discus about the future of Data Loaders: vuejs/rfcs#460 -
since data loaders aren't meant to be awaited in script setup (they are awaited at the navigation level), they now return a promise of the raw data only, not of the UseDataLoaderReturn, to make it clearer that this syntax is a bit special and should only be used within nested loaders. This change also brings other benefits like allowing lazy loaders to be awaited within loaders without changing their usage outside, in components. Also, allowing different types of commit while still allowing data to be awaited within loaders.
- The
0.7.0 (2023-09-22)
- allow overriding and extending folder options (1f6e312)
- correctly ignore folders (cbd14b9)
- keep parent override in children (f651961), closes #189
- allow path as function (b913f56)
excludeis no longer relative toroutesFolder.srcbut to the cwd. like other paths. Note this is technically a fix that should simplify your configuration.
0.6.4 (2023-05-09)
0.6.3 (2023-05-02)
- handle empty regexp in raw routes (9bea452)
0.6.2 (2023-05-01)
- options: dotNesting (b7abc9b)
0.6.1 (2023-05-01)
- types: correct exports in new files (e9056f7)
0.6.0 (2023-05-01)
- allow inserting raw routes in the editable tree node (c04d068)
- dotNesting option to disable dot special handling in filenames (d803831)
- types: expose RouterLinkProps typed (04031b4)
0.5.5 (2023-04-18)
- no missing imports (65f8c83)
- remove old option (7368185)
- split types from index to avoid types pollution (4026948), closes #136
- types: skip postbuild fix on types (d54a9b7)
0.5.4 (2023-03-02)
- allow exclude per folder (468b251)
0.5.3 (2023-03-02)
- feat!: rename filePattern to filePatterns and allow arrays (8902778)
filePatternis now namedfilePatternsbecause it allows arrays. This is only a naming change.
0.5.2 (2023-03-02)
- allow overriding the file pattern (96febf1)
0.5.1 (2023-03-01)
0.5.0 (2023-02-16)
- feat!: allow set operations on meta (a84d659)
- types: improve routeBlockLang (19bd892)
- if you were setting directly
route.metawithinextendRoute(), you know need to useroute.addToMeta()instead to have the same merging behavior. Directly settingroute.metanow replaces themetaproperty completely.
0.4.1 (2023-02-16)
- webpack: handle loadInclude (9a43b63)
0.4.0 (2023-02-16)
-
handle insertions with leading slash in extendRoute (d1287b8)
-
feat!: rename EditableTreeNode
filestocomponents(5c359c9)
- add internal name in virtual files as comments (326156d)
- allow changing the path in extendRoute (a9d0c77)
- the property
filesinEditableTreeNode(e.g. withinextendRoute) is now namedcomponentsto match the route record name.
0.3.3 (2023-02-15)
🙌 This version introduces the ability to extend the routes with the extendRoutes option. Please refer to the relevant issue for use cases and share any problems you might have.
- runtime: merge aliases (73bacd9)
- beforeWriteFiles (cc12c24)
- extendRoute (ff0195f)
- warn: improve invalid lang warn for route block (5c8c7df)
- warn: missing dots in extensions (18f30a1), closes #117
- wip extendroutes (627f417)
0.3.2 (2023-01-09)
0.3.1 (2023-01-08)
- parse non modules with definePage (ce70048), closes #114
- stricter extension check (f5f508a)
- work with files named definePage (178107b)
0.3.0 (2023-01-03)
0.2.3 (2022-10-05)
- merge route record (f1e7c8b)
0.2.2 (2022-09-30)
- types: for auto import (49ffe81)
- types: remove trailing slash in path for nested routes (f0cfb36), closes #70
0.2.1 (2022-08-27)
0.2.0 (2022-08-26)
Refer to https://github.com/posva/unplugin-vue-router/tree/main/src/data-fetching for up to date information on how to use the data fetching.
- add setupNavigationGuard options (0656e35)
- explicitly allow for the data fetching guard (5f672b2)
- importMode option (9aa2e33), closes #47
- one single auto import (c82e964)
- parse definePage (b2470a6)
- support props to route blocks (073c29c), closes #49
0.1.2 (2022-08-10)
- ssr: support SSR (5578f7d)
0.1.1 (2022-08-09)
- types: declaration of auto module (e5ac67c)
0.1.0 (2022-08-09)
- deep merge meta properties (47bce4f)
- expose options subpath (#42) (b44c32e)
- handle nested loaders that were already called (6887fb2)
- reload the page during dev when no cache entry is available (918bfd0)
- support older browsers with object.assign (66c7ae0)
- trigger loaders only once when nested (4a13819)
- rename
[@vue-router](https://github.com/vue-router)tovue-router/auto(461530a)
- add basic data loaders (9c19fd2)
- add lazy loaders (815f875)
- add pendingLoad (055bc3c)
- allow enabling experimental data fetching (1b7e6b3)
- change default route component folder to
src/pages(6d6cb13) - implement nested sequential loaders (6d5201f)
- track hash reads (e5583a4)
-
the module name is now
vue-router/autoinstead of@vue-router. To upgrade to this version you only need to replace it:-import { ... } from '@vue-router' +import { ... } from 'vue-router/auto' -import { ... } from '@vue-router/routes' +import { ... } from 'vue-router/auto/routes'
This allows stubbing the package in
vue-routerto hint the user towards this plugin. -
the default value of
routesFolderis changed fromsrc/routestosrc/pages. If you didn't change this setting, you will have to either:- rename your
src/routesfolder tosrc/pages - add
routesFolder: 'src/routes'to the options of the plugin in your vite, webpack, etc config
- rename your
0.0.21 (2022-07-12)
0.0.20 (2022-07-07)
- correct arg for useLink (afdf147)
0.0.19 (2022-07-07)
0.0.18 (2022-07-07)
0.0.17 (2022-07-06)
0.0.16 (2022-07-06)
0.0.15 (2022-07-05)
0.0.14 (2022-07-05)
- handle updates of routes (1a9a028)
0.0.13 (2022-07-05)
0.0.12 (2022-07-04)
0.0.11 (2022-07-04)
Adapt peer vue router per dep to 4.1.0.
0.0.10 (2022-07-04)
- add route json schema (c5480e1)
- parse route custom block (963d1ca)
- vite: reload when routes change (0231679)
0.0.9 (2022-07-01)
0.0.8 (2022-06-29)
- correctly extendRoutes (e8d22a2)
- handle static unnested paths (56b73d7)
- stable order of paths (59d743a)
0.0.7 (2022-06-28)
- stable order of paths (59d743a)
- allow extending routes with extendRoutes (da4db97)
- keep one component if possible (efe20e2)
- named view support (#6) (a46dcd2)
0.0.6 (2022-06-27)
- small fixes
0.0.5 (2022-06-27)
- handle unnested routes (f52304d)
0.0.4 (2022-06-24)
- use virtual modules for @vue-router (74cb353)
0.0.3 (2022-06-24)
- correct module id (eb4ee83)
0.0.1 (2022-06-24)
- setup chokidar watcher (15f217f)