mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 19:04:02 +00:00
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:
1 parent
2ce1c55f69
commit
d81ebf1268
2 files changed
+18
No files matched your search
@@ -26,6 +26,12 @@ export function panelBuildConfig(config) {
|
|||||||
cssCodeSplit: false,
|
cssCodeSplit: false,
|
||||||
rollupOptions: {
|
rollupOptions: {
|
||||||
...config.build?.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 },
|
output: { inlineDynamicImports: true },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -114,3 +114,15 @@ test("Cesium's workers get embedded files from memory and other requests from th
|
|||||||
globalThis.ProgressEvent = saved.ProgressEvent;
|
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]);
|
||||||
|
});
|
||||||
Reference in new issue
Block a user