From 80e35335111ea259e41b9af59315bee32c026c0f Mon Sep 17 00:00:00 2001 From: "X.Mo" Date: Tue, 19 Sep 2023 09:37:56 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BC=98=E5=8C=96vite=E5=9C=A8?= =?UTF-8?q?=E6=89=93=E5=8C=85=E6=97=B6=E5=88=86=E5=9D=97=E6=89=93=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vite.config.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/vite.config.js b/vite.config.js index 6135e007..00364fad 100644 --- a/vite.config.js +++ b/vite.config.js @@ -18,7 +18,16 @@ export default ({ mode }) => { }, build: { - chunkSizeWarningLimit: 3000, + chunkSizeWarningLimit: 1500, + rollupOptions: { + output: { + manualChunks(id) { + if (id.includes('node_modules')) { + return id.toString().split("node_modules/")[1].split("/")[0].toString(); + } + } + } + } }, server: {