From 625fc35f712fcc726cd183f867ea8990a0629d5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A6=99=E7=A0=81=E7=94=9F=E8=8A=B1?= <18523774412@qq.com> Date: Tue, 25 Oct 2022 19:11:13 +0800 Subject: [PATCH] =?UTF-8?q?build:=E5=90=88=E5=B9=B6css=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E3=80=81=E5=A2=9E=E5=8A=A0=E5=88=86=E5=8C=85=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E7=A4=BA=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/vite.config.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/web/vite.config.ts b/web/vite.config.ts index 6fa9a177..a933e60b 100644 --- a/web/vite.config.ts +++ b/web/vite.config.ts @@ -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: {