Reduce admin shell chunk fanout

This commit is contained in:
zhx 2026-07-02 15:17:30 +08:00
parent f44097570d
commit 6726a21e9c

View File

@ -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,