From 6508bef70faf2466c893db48c841d363aa43a227 Mon Sep 17 00:00:00 2001 From: xiangheng <11675084@qq.com> Date: Fri, 25 Oct 2024 10:55:15 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AC=AC=E4=B8=89=E6=96=B9=E5=8C=85=E6=8B=86?= =?UTF-8?q?=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/vite.config.ts | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/admin/vite.config.ts b/admin/vite.config.ts index 483f9a0..ee24a33 100644 --- a/admin/vite.config.ts +++ b/admin/vite.config.ts @@ -25,8 +25,26 @@ export default ({ mode }) => { }, base: './', 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: { open: true, host: '0.0.0.0', @@ -68,8 +86,8 @@ export default ({ mode }) => { // algorithm: 'brotliCompress' // }) visualizer({ - gzipSize: true, - brotliSize: true, + gzipSize: false, + brotliSize: false, emitFile: false, filename: 'test.html', //分析图生成的文件名 open: true