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 {
205205 paths : [ this . options . implementation ] ,
206206 } ) ;
207207 }
208+ if ( Array . isArray ( compiler . options . resolve . alias ) ) {
209+ return ;
210+ }
208211
209212 compiler . options . resolve . alias = {
210213 ...compiler . options . resolve . alias ,
211- '@module-federation/runtime$' : runtimePath ,
212- '@module-federation/runtime-tools$' :
213- this . options ?. implementation || RuntimeToolsPath ,
214214 } ;
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+ }
215224 }
216225
217226 apply ( compiler : Compiler ) {
You can’t perform that action at this time.
0 commit comments