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