posva / unplugin-vue-router

Next Generation file based typed routing for Vue Router
https://uvr.esm.is
MIT License
1.68k stars 82 forks source link

'"unplugin-vue-router"' has no exported member named 'VueRouterAutoImports'. #67

Closed sil2 closed 2 years ago

sil2 commented 2 years ago

import { VueRouterAutoImports } from 'unplugin-vue-router'

'"unplugin-vue-router"' has no exported member named 'VueRouterAutoImports'. Did you mean 'VueRouterExports'?ts(2724)

also... Do you know how to add router.beforeEach((to, from). logic in router defined in vite.config.ts ?

im using AutoImport from unplugin-auto-import/vite ....

posva commented 2 years ago

Until a new version is released, use VueRouterExports (deprecated):

- VueRouterAutoImports
+ { 'vue-router/auto': VueRouterExports }