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(); + } + } + } + } } }; };