fix(misc): shared deps that rely on default configuration are filtered out (#16193)

Co-authored-by: Dmitry Marcautan <dmitry.marcautan@infopulse.com>
This commit is contained in:
Dmitry Marcautan 2023-04-11 13:51:13 +03:00 committed by GitHub
parent 98501aa56b
commit 432e07440e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

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

View File

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