File tree Expand file tree Collapse file tree 2 files changed +17
-3
lines changed
packages/enhanced/src/lib/container/runtime Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' @module-federation/enhanced ' : patch
3
+ ---
4
+
5
+ fix: not duplicate set resolve.alias
Original file line number Diff line number Diff line change @@ -205,13 +205,22 @@ class FederationRuntimePlugin {
205
205
paths : [ this . options . implementation ] ,
206
206
} ) ;
207
207
}
208
+ if ( Array . isArray ( compiler . options . resolve . alias ) ) {
209
+ return ;
210
+ }
208
211
209
212
compiler . options . resolve . alias = {
210
213
...compiler . options . resolve . alias ,
211
- '@module-federation/runtime$' : runtimePath ,
212
- '@module-federation/runtime-tools$' :
213
- this . options ?. implementation || RuntimeToolsPath ,
214
214
} ;
215
+
216
+ if ( ! compiler . options . resolve . alias [ '@module-federation/runtime$' ] ) {
217
+ compiler . options . resolve . alias [ '@module-federation/runtime$' ] =
218
+ runtimePath ;
219
+ }
220
+ if ( ! compiler . options . resolve . alias [ '@module-federation/runtime-tools$' ] ) {
221
+ compiler . options . resolve . alias [ '@module-federation/runtime-tools$' ] =
222
+ this . options ?. implementation || RuntimeToolsPath ;
223
+ }
215
224
}
216
225
217
226
apply ( compiler : Compiler ) {
You can’t perform that action at this time.
0 commit comments