第三方包拆分

This commit is contained in:
xiangheng
2024-10-25 10:55:15 +08:00
parent 490ba9bf69
commit 6508bef70f

View File

@@ -25,8 +25,26 @@ export default ({ mode }) => {
}, },
base: './', base: './',
build: { build: {
sourcemap: true sourcemap: true,
rollupOptions: {
output: {
manualChunks: {
vue: ['vue'],
pinia: ['pinia'],
axios: ['axios'],
dayjs: ['dayjs'],
echarts: ['echarts'],
'highlight.js': ['highlight.js'],
'element-plus': ['element-plus'],
'vue-router': ['vue-router'],
'lodash-es': ['lodash-es'],
vuedraggable: ['vuedraggable'],
'vform3-builds': ['vform3-builds']
}
}
}
}, },
server: { server: {
open: true, open: true,
host: '0.0.0.0', host: '0.0.0.0',
@@ -68,8 +86,8 @@ export default ({ mode }) => {
// algorithm: 'brotliCompress' // algorithm: 'brotliCompress'
// }) // })
visualizer({ visualizer({
gzipSize: true, gzipSize: false,
brotliSize: true, brotliSize: false,
emitFile: false, emitFile: false,
filename: 'test.html', //分析图生成的文件名 filename: 'test.html', //分析图生成的文件名
open: true open: true