File tree 1 file changed +10
-1
lines changed
packages/module-federation/src/utils
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -102,7 +102,16 @@ export function getRemotes(
102
102
( r ) => ! remotesToSkip . has ( r )
103
103
) ;
104
104
105
- const knownDynamicRemotes = dynamicRemotes . filter (
105
+ // With dynamic remotes, the manifest file may contain the names with `_` due to MF limitations on naming
106
+ // The project graph might contain these names with `-` rather than `_`. Check for both.
107
+ // This can occur after migration of existing remotes past Nx 19.8
108
+ let normalizedDynamicRemotes = dynamicRemotes . map ( ( r ) => {
109
+ if ( context . projectGraph . nodes [ r . replace ( / _ / g, '-' ) ] ) {
110
+ return r . replace ( / _ / g, '-' ) ;
111
+ }
112
+ return r ;
113
+ } ) ;
114
+ const knownDynamicRemotes = normalizedDynamicRemotes . filter (
106
115
( r ) => ! remotesToSkip . has ( r ) && context . projectGraph . nodes [ r ]
107
116
) ;
108
117
You can’t perform that action at this time.
0 commit comments