fix(misc): filter shared libraries by import name in module federation helpers (#15980)

This commit is contained in:
Leosvel Pérez Espinosa 2023-03-31 15:45:28 +01:00 committed by GitHub
parent a404595be6
commit 5c33797040
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -60,7 +60,7 @@ export async function getModuleFederationConfig(
if (mfConfig.shared) {
dependencies.workspaceLibraries = dependencies.workspaceLibraries.filter(
(lib) => mfConfig.shared(lib.name, {})
(lib) => mfConfig.shared(lib.importKey, {})
);
dependencies.npmPackages = dependencies.npmPackages.filter((pkg) =>
mfConfig.shared(pkg, {})

View File

@ -40,7 +40,7 @@ export async function getModuleFederationConfig(
if (mfConfig.shared) {
dependencies.workspaceLibraries = dependencies.workspaceLibraries.filter(
(lib) => mfConfig.shared(lib.name, {})
(lib) => mfConfig.shared(lib.importKey, {})
);
dependencies.npmPackages = dependencies.npmPackages.filter((pkg) =>
mfConfig.shared(pkg, {})