2023-02-26 02:54:53 +08:00
|
|
|
import { fileURLToPath, URL } from 'node:url'
|
2023-02-20 23:52:55 +08:00
|
|
|
|
2023-02-26 02:54:53 +08:00
|
|
|
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 { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
|
2023-02-20 23:52:55 +08:00
|
|
|
|
|
|
|
// https://vitejs.dev/config/
|
|
|
|
export default defineConfig({
|
2023-02-26 02:54:53 +08:00
|
|
|
base: '',
|
2023-02-20 23:52:55 +08:00
|
|
|
plugins: [
|
|
|
|
vue(),
|
|
|
|
AutoImport({
|
|
|
|
resolvers: [ElementPlusResolver()],
|
|
|
|
}),
|
|
|
|
Components({
|
|
|
|
resolvers: [ElementPlusResolver()],
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
resolve: {
|
|
|
|
alias: {
|
2023-02-26 02:54:53 +08:00
|
|
|
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
2023-02-20 23:52:55 +08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
build: {
|
2023-02-26 02:54:53 +08:00
|
|
|
assetsDir: '',
|
2023-02-20 23:52:55 +08:00
|
|
|
},
|
2023-02-26 02:54:53 +08:00
|
|
|
})
|