Skip to content

Commit

Permalink
fix(misc): shared deps that rely on default configuration are filtere…
Browse files Browse the repository at this point in the history
…d out (#16193)

Co-authored-by: Dmitry Marcautan <[email protected]>
  • Loading branch information
dmarcautan and Dmitry Marcautan authored Apr 11, 2023
1 parent 98501aa commit 432e074
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions packages/angular/src/utils/mf/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ export async function getModuleFederationConfig(

if (mfConfig.shared) {
dependencies.workspaceLibraries = dependencies.workspaceLibraries.filter(
(lib) => mfConfig.shared(lib.importKey, {})
(lib) => mfConfig.shared(lib.importKey, {}) !== false
);
dependencies.npmPackages = dependencies.npmPackages.filter((pkg) =>
mfConfig.shared(pkg, {})
dependencies.npmPackages = dependencies.npmPackages.filter(
(pkg) => mfConfig.shared(pkg, {}) !== false
);
}

Expand Down
6 changes: 3 additions & 3 deletions packages/react/src/module-federation/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ export async function getModuleFederationConfig(

if (mfConfig.shared) {
dependencies.workspaceLibraries = dependencies.workspaceLibraries.filter(
(lib) => mfConfig.shared(lib.importKey, {})
(lib) => mfConfig.shared(lib.importKey, {}) !== false
);
dependencies.npmPackages = dependencies.npmPackages.filter((pkg) =>
mfConfig.shared(pkg, {})
dependencies.npmPackages = dependencies.npmPackages.filter(
(pkg) => mfConfig.shared(pkg, {}) !== false
);
}

Expand Down

0 comments on commit 432e074

Please sign in to comment.