tiny-rdm/frontend/vite.config.js

33 lines
915 B
JavaScript
Raw Normal View History

2023-06-27 15:53:29 +08:00
import vue from '@vitejs/plugin-vue'
import AutoImport from 'unplugin-auto-import/vite'
import Icons from 'unplugin-icons/vite'
import { NaiveUiResolver } from 'unplugin-vue-components/resolvers'
import Components from 'unplugin-vue-components/vite'
import { defineConfig } from 'vite'
const rootPath = new URL('.', import.meta.url).pathname
2023-06-27 15:53:29 +08:00
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue(),
AutoImport({
imports: [
{
'naive-ui': ['useDialog', 'useMessage', 'useNotification', 'useLoadingBar'],
},
],
}),
Components({
resolvers: [NaiveUiResolver()],
}),
Icons(),
],
resolve: {
alias: {
'@': rootPath + 'src',
2023-08-02 17:57:39 +08:00
stores: rootPath + 'src/stores',
wailsjs: rootPath + 'wailsjs',
},
},
2023-06-27 15:53:29 +08:00
})