refactor(javascript): normalize erased expression syntax once

This commit is contained in:
morluto committed 2026-10-10 01:45:01 +08:00
1 parent cfb12e47dc
commit b628bba1fa
17 files changed
+313 -205

No files matched your search

@@ -67,3 +67,15 @@ it("keeps module references attributed across many real factory ranges", () => {
)?.module_key,
).toBe("module-0");
});
it("retains the chunk runtime through a TypeScript-only expression wrapper", () => {
const analysis = analyzeJavaScriptStaticSource(
'(globalThis.webpackChunkApp satisfies unknown).push([[1], { "entry": function () {} }]);',
);
expect(analysis.bundler_registrations).toEqual([
expect.objectContaining({
runtime: "webpackChunkApp",
modules: [expect.objectContaining({ module_key: "entry" })],
}),
]);
});