File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ ' @module-federation/rspack ' : patch
3+ ---
4+
5+ fix(rspack): only patchChunkSplit when config set exposes
Original file line number Diff line number Diff line change @@ -67,7 +67,12 @@ export class ModuleFederationPlugin implements RspackPluginInstance {
6767 }
6868 this . _checkSingleton ( compiler ) ;
6969 this . _patchBundlerConfig ( compiler ) ;
70- this . _patchChunkSplit ( compiler , options . name ) ;
70+ const containerManager = new ContainerManager ( ) ;
71+ containerManager . init ( options ) ;
72+
73+ if ( containerManager . enable ) {
74+ this . _patchChunkSplit ( compiler , options . name ) ;
75+ }
7176
7277 options . implementation = options . implementation || RuntimeToolsPath ;
7378 let disableManifest = options . manifest === false ;
@@ -79,8 +84,6 @@ export class ModuleFederationPlugin implements RspackPluginInstance {
7984 }
8085 if ( ! disableManifest && options . exposes ) {
8186 try {
82- const containerManager = new ContainerManager ( ) ;
83- containerManager . init ( options ) ;
8487 options . exposes = containerManager . containerPluginExposesOptions ;
8588 } catch ( err ) {
8689 if ( err instanceof Error ) {
You can’t perform that action at this time.
0 commit comments