diff --git a/src/presets/@vue-router.ts b/src/presets/@vue-router.ts new file mode 100644 index 00000000..1df543ea --- /dev/null +++ b/src/presets/@vue-router.ts @@ -0,0 +1,10 @@ +import type { ImportsMap } from '../types' + +export default ({ + '@vue-router': [ + 'useRouter', + 'useRoute', + 'createRouter', + 'createWebHistory', + ], +}) diff --git a/src/presets/index.ts b/src/presets/index.ts index 92ca3908..fc028c24 100644 --- a/src/presets/index.ts +++ b/src/presets/index.ts @@ -23,6 +23,7 @@ import vue from './vue' import vueDemi from './vue-demi' import vueI18n from './vue-i18n' import vueRouter from './vue-router' +import unpluginVueRouter from './@vue-router' import vueCompositionApi from './vue-composition-api' import vueuseCore from './vueuse-core' import vueMacros from './vue-macros' @@ -59,6 +60,7 @@ export const presets = { 'vitepress': vitepress, 'vue-demi': vueDemi, 'vue-i18n': vueI18n, + '@vue-router': unpluginVueRouter, 'vue-router': vueRouter, 'vue': vue, 'vue/macros': vueMacros,