import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import AutoImport from 'unplugin-auto-import/vite' import Components from 'unplugin-vue-components/vite' import { NaiveUiResolver } from 'unplugin-vue-components/resolvers' import Unocss from 'unocss/vite' // https://vitejs.dev/config/ export default defineConfig({ plugins: [ vue({ reactivityTransform: true, }), AutoImport({ imports: [ 'vue', 'vue/macros', 'vue-router', 'vue-i18n', '@vueuse/core', 'pinia', { 'naive-ui': [ 'useDialog', 'useMessage', 'useNotification', 'useLoadingBar', ], }, ], dts: 'types/auto-imports.d.ts', dirs: [ 'src/stores', 'src/composables', ], }), Components({ resolvers: [NaiveUiResolver()], dts: 'types/components.d.ts', dirs: [ 'src/components', ], }), Unocss(), ], })