Skip to content

Commit

Permalink
fix(misc): handle external nodes correctly in module federation addit…
Browse files Browse the repository at this point in the history
…ional shared config
  • Loading branch information
leosvelperez committed Jul 5, 2022
1 parent 6a63138 commit d8918bc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/angular/src/utils/mf/with-module-federation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ function addStringDependencyToSharedConfig(
): void {
if (projectGraph.nodes[dependency]) {
sharedConfig[dependency] = { requiredVersion: false };
} else if (projectGraph.externalNodes?.[dependency]) {
} else if (projectGraph.externalNodes?.[`npm:${dependency}`]) {
const pkgJson = readRootPackageJson();
const config = getNpmPackageSharedConfig(
dependency,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ function addStringDependencyToSharedConfig(
): void {
if (projectGraph.nodes[dependency]) {
sharedConfig[dependency] = { requiredVersion: false };
} else if (projectGraph.externalNodes?.[dependency]) {
} else if (projectGraph.externalNodes?.[`npm:${dependency}`]) {
const pkgJson = readRootPackageJson();
const config = getNpmPackageSharedConfig(
dependency,
Expand Down

0 comments on commit d8918bc

Please sign in to comment.