unplugin-vue-router
Advanced tools
Changelog
0.10.0 (2024-06-21)
definePage()
globally available (7a57597)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
.
Changelog
0.9.0 (2024-05-28)
routes
import to avoid cyclic imports (63788f6), closes #132createRouter()
now requires the explicit router
property 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.
Tree
and PrefixTree
insert 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.
"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...Changelog
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/