The newly created ". vue" file does not recognize automatically imported hooks generated through "unplugin auto import", such as "onMounted".VSCode must be restarted to recognize.
import vue from '@vitejs/plugin-vue';
import AutoImport from 'unplugin-auto-import/vite';
import VueRouter from 'unplugin-vue-router/vite';
import { VueRouterAutoImports } from 'unplugin-vue-router';
import type { PluginOption } from 'vite';
Issue Description:
The newly created ". vue" file does not recognize automatically imported hooks generated through "unplugin auto import", such as "onMounted".VSCode must be restarted to recognize.
Steps to Reproduce:
import vue from '@vitejs/plugin-vue'; import AutoImport from 'unplugin-auto-import/vite'; import VueRouter from 'unplugin-vue-router/vite'; import { VueRouterAutoImports } from 'unplugin-vue-router'; import type { PluginOption } from 'vite';
export function createPlugins(env: ImportMetaEnv): PluginOption[] { return [ VueRouter({ routesFolder: ['src/views'], dts: 'src/types/auto/auto-router.d.ts', extensions: ['.page.vue', '.vue'], }), vue(),
}