build: the panel build leaves out the initial-chunk guard

The MCP panel build inlines every dynamic import into its one script, the
Navara mode included, so the guard that keeps Navara out of the app's
initial chunks failed it (npm run build:panel was red since d483e589). The
panel config filters the guard out, as phase 4 does; a test pins it.
build:panel is green and joins the gates. Phase-4 merge review item 2.
This commit is contained in:
German Khokhlov committed 2026-10-17 01:09:58 +04:00
1 parent 2ce1c55f69
commit d81ebf1268
2 files changed
+18

No files matched your search

+6
View File
@@ -26,6 +26,12 @@ export function panelBuildConfig(config) {
cssCodeSplit: false,
rollupOptions: {
...config.build?.rollupOptions,
// The panel inlines every dynamic import into its one script, the
// experimental Navara mode included, so the guard that keeps Navara
// out of the app's initial chunks does not apply here.
plugins: (config.build?.rollupOptions?.plugins ?? []).filter(
(plugin) => plugin?.name !== 'gev-initial-chunk-guard',
),
output: { inlineDynamicImports: true },
},
},
+12
View File
@@ -114,3 +114,15 @@ test("Cesium's workers get embedded files from memory and other requests from th
globalThis.ProgressEvent = saved.ProgressEvent;
}
});
test('the panel build leaves out the initial-chunk guard (it inlines Navara)', () => {
const kept = { name: 'kept' };
const config = panelBuildConfig({
build: {
rollupOptions: {
plugins: [kept, { name: 'gev-initial-chunk-guard' }],
},
},
});
assert.deepEqual(config.build.rollupOptions.plugins, [kept]);
});