mirror of
https://github.com/morluto/rea.git
synced 2026-12-03 21:46:01 +00:00
refactor(javascript): share unresolved bundler node construction (#14441)
This commit is contained in:
1 parent
b3ae717188
commit
17a1d033fe
4 files changed
+52
-80
No files matched your search
@@ -13,11 +13,10 @@ import {
|
||||
applicationContainerIdentity,
|
||||
addApplicationRootCandidate,
|
||||
artifactLocalIdentity,
|
||||
chunkLookupKey,
|
||||
bundlerLookupKey,
|
||||
createElectronRoleNode,
|
||||
javascriptAnalysisCoverage,
|
||||
linkElectronRoleToAsset,
|
||||
moduleLookupKey,
|
||||
selfReferenceOmissions,
|
||||
sourceNodeFor,
|
||||
type JavaScriptArtifactGraphContext,
|
||||
@@ -774,7 +773,7 @@ const resolveReference = (
|
||||
reference.loader === "commonjs-loader"
|
||||
? undefined
|
||||
: context.moduleNodes.get(
|
||||
moduleLookupKey(sourcePath, reference.module_runtime, specifier),
|
||||
bundlerLookupKey(sourcePath, reference.module_runtime, specifier),
|
||||
);
|
||||
if (module !== undefined) {
|
||||
const file = context.filesByPath.get(sourcePath);
|
||||
@@ -979,7 +978,7 @@ const resolveBundlerChunkReference = (
|
||||
if (registrations === undefined) return null;
|
||||
const candidates = registrations.flatMap(({ runtime }) => {
|
||||
const node = context.chunkNodes.get(
|
||||
chunkLookupKey(sourcePath, runtime, key),
|
||||
bundlerLookupKey(sourcePath, runtime, key),
|
||||
);
|
||||
return node === undefined ? [] : [node];
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user