From c63d37456508a9628e4453d18aede1671d5d3512 Mon Sep 17 00:00:00 2001 From: icssoa <615206459@qq.com> Date: Thu, 19 May 2022 16:17:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=88=86=E5=89=B2=E6=89=93?= =?UTF-8?q?=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- vite.config.ts | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 517bfaf..b898c8b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "front-next", - "version": "5.2.0", + "version": "5.2.1", "scripts": { "dev": "vite --host", "build": "vite build", diff --git a/vite.config.ts b/vite.config.ts index b394065..9dd394b 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -53,7 +53,16 @@ export default (): UserConfig => { }, build: { sourcemap: false, - polyfillDynamicImport: false // 必须为false + polyfillDynamicImport: false, // 必须为false + rollupOptions: { + output: { + manualChunks(id) { + if (id.includes("node_modules")) { + return id.toString().split("node_modules/")[1].split("/")[0].toString(); + } + } + } + } } }; };