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,