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'
|
|
|
|
|
2023-08-02 17:13:03 +08:00
|
|
|
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(),
|
|
|
|
],
|
2023-08-02 17:13:03 +08:00
|
|
|
resolve: {
|
|
|
|
alias: {
|
|
|
|
'@': rootPath + 'src',
|
2023-08-02 17:57:39 +08:00
|
|
|
stores: rootPath + 'src/stores',
|
|
|
|
wailsjs: rootPath + 'wailsjs',
|
2023-08-02 17:13:03 +08:00
|
|
|
},
|
|
|
|
},
|
2024-11-07 14:58:44 +08:00
|
|
|
css: {
|
|
|
|
preprocessorOptions: {
|
|
|
|
scss: {
|
|
|
|
api: 'modern-compiler',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2023-06-27 15:53:29 +08:00
|
|
|
})
|