File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed 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 {
67
67
}
68
68
this . _checkSingleton ( compiler ) ;
69
69
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
+ }
71
76
72
77
options . implementation = options . implementation || RuntimeToolsPath ;
73
78
let disableManifest = options . manifest === false ;
@@ -79,8 +84,6 @@ export class ModuleFederationPlugin implements RspackPluginInstance {
79
84
}
80
85
if ( ! disableManifest && options . exposes ) {
81
86
try {
82
- const containerManager = new ContainerManager ( ) ;
83
- containerManager . init ( options ) ;
84
87
options . exposes = containerManager . containerPluginExposesOptions ;
85
88
} catch ( err ) {
86
89
if ( err instanceof Error ) {
You can’t perform that action at this time.
0 commit comments