mirror of
https://gitee.com/xiangheng/x_admin.git
synced 2025-12-24 08:12:55 +08:00
第三方包拆分
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user