From ce3f7f4ed8adb06f69426abf649941ed7ce83d2d Mon Sep 17 00:00:00 2001 From: Colum Ferry Date: Wed, 26 Jun 2024 15:09:17 +0100 Subject: [PATCH] fix(module-federation): dynamic remotes external to workspace should be skipped correctly #26551 (#26692) ## Current Behavior Module Federation utils were not checking if the remotes defined dynamically in the `module-federation.manifest.json` were in the project graph. ## Expected Behavior Check that the dynamic remotes exist in the project graph before trying to do work with them ## Related Issue(s) Fixes #26551 --- .../webpack/src/utils/module-federation/get-remotes-for-host.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/webpack/src/utils/module-federation/get-remotes-for-host.ts b/packages/webpack/src/utils/module-federation/get-remotes-for-host.ts index 2b84a32a7df7b..39495d730a9b2 100644 --- a/packages/webpack/src/utils/module-federation/get-remotes-for-host.ts +++ b/packages/webpack/src/utils/module-federation/get-remotes-for-host.ts @@ -103,7 +103,7 @@ export function getRemotes( ); const knownDynamicRemotes = dynamicRemotes.filter( - (r) => !remotesToSkip.has(r) + (r) => !remotesToSkip.has(r) && context.projectGraph.nodes[r] ); logger.info(