fix(javascript): retain runtime scope in bundled module relationships

This commit is contained in:
dakjdakd authored and Ysopwnable committed 2026-10-11 01:36:12 +08:00
1 parent 0d89978333
commit c1217e711b
14 files changed
+394 -42

No files matched your search

@@ -161,7 +161,7 @@ const addBundlerModuleNodes = (
],
});
context.moduleNodes.set(
moduleLookupKey(file.path, moduleValue.module_key),
moduleLookupKey(file.path, registration.runtime, moduleValue.module_key),
module,
);
addAstContainsEdge(context, {
@@ -195,7 +195,7 @@ const addBundlerRuntimeEdges = (
const { file, registration, chunk, coverage } = record;
for (const moduleKey of registration.entry_module_keys) {
const resolved = context.moduleNodes.get(
moduleLookupKey(file.path, moduleKey),
moduleLookupKey(file.path, registration.runtime, moduleKey),
);
const target =
resolved ?? unresolvedBundlerModuleNode(context, record, moduleKey);