39 lines
718 B
JavaScript
39 lines
718 B
JavaScript
|
|
import { defineConfig } from 'vite'
|
||
|
|
import vue from '@vitejs/plugin-vue'
|
||
|
|
import { resolve } from 'path'
|
||
|
|
|
||
|
|
// https://vite.dev/config/
|
||
|
|
export default defineConfig({
|
||
|
|
plugins: [vue()],
|
||
|
|
resolve: {
|
||
|
|
alias: {
|
||
|
|
'@': resolve(__dirname, 'src'),
|
||
|
|
},
|
||
|
|
},
|
||
|
|
css: {
|
||
|
|
preprocessorOptions: {
|
||
|
|
scss: {
|
||
|
|
// 移除自动导入,改用@use语法
|
||
|
|
}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
server: {
|
||
|
|
port: 5173,
|
||
|
|
open: true
|
||
|
|
},
|
||
|
|
build: {
|
||
|
|
outDir: 'dist',
|
||
|
|
sourcemap: false,
|
||
|
|
chunkSizeWarningLimit: 1600,
|
||
|
|
rollupOptions: {
|
||
|
|
output: {
|
||
|
|
manualChunks: {
|
||
|
|
vue: ['vue', 'vue-router', 'pinia'],
|
||
|
|
elementPlus: ['element-plus'],
|
||
|
|
utils: ['axios']
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
})
|