From 6726a21e9cd544970f63ade3207d751660847753 Mon Sep 17 00:00:00 2001 From: zhx Date: Thu, 2 Jul 2026 15:17:30 +0800 Subject: [PATCH] Reduce admin shell chunk fanout --- vite.config.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/vite.config.js b/vite.config.js index 7c3baa4..367b91a 100644 --- a/vite.config.js +++ b/vite.config.js @@ -45,6 +45,17 @@ export default defineConfig({ build: { modulePreload: false, rollupOptions: { + output: { + manualChunks(id) { + // Keep the admin shell dependency graph shallow; GAAP resets the browser HTTP/2 connection when the first screen fans out into many module requests. + if (id.includes("node_modules")) { + return "vendor"; + } + if (id.includes("/src/shared/") || id.includes("/src/app/")) { + return "shared"; + } + } + }, input: { admin: new URL("./index.html", import.meta.url).pathname, databi: new URL("./databi/index.html", import.meta.url).pathname,