mirror of
https://gitee.com/wonderful-code/buildadmin
synced 2024-11-22 07:04:24 +00:00
build:合并css文件、增加分包配置示例
This commit is contained in:
parent
6b3a8da1dc
commit
625fc35f71
@ -40,10 +40,20 @@ const viteConfig = ({ mode }: ConfigEnv): UserConfig => {
|
||||
proxy: proxy,
|
||||
},
|
||||
build: {
|
||||
cssCodeSplit: false,
|
||||
sourcemap: false,
|
||||
outDir: VITE_OUT_DIR,
|
||||
emptyOutDir: true,
|
||||
chunkSizeWarningLimit: 1500,
|
||||
rollupOptions: {
|
||||
output: {
|
||||
manualChunks: {
|
||||
// 分包配置,配置完成自动按需加载
|
||||
vue: ['vue', 'vue-router', 'pinia', 'vue-i18n', 'element-plus'],
|
||||
echarts: ['echarts'],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
css: {
|
||||
postcss: {
|
||||
|
Loading…
Reference in New Issue
Block a user