File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
packages/enhanced/src/lib/container Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @module-federation/enhanced ' : minor
3+ ---
4+
5+ fix(enhanced): add module factory for EntryDependency when entry is empty
6+
7+ - bind normalModuleFactory for EntryDependency when no moduleFactory is bound for EntryDependency
Original file line number Diff line number Diff line change @@ -27,6 +27,10 @@ const ModuleDependency = require(
2727 normalizeWebpackPath ( 'webpack/lib/dependencies/ModuleDependency' ) ,
2828) as typeof import ( 'webpack/lib/dependencies/ModuleDependency' ) ;
2929
30+ const EntryDependency = require (
31+ normalizeWebpackPath ( 'webpack/lib/dependencies/EntryDependency' ) ,
32+ ) as typeof import ( 'webpack/lib/dependencies/EntryDependency' ) ;
33+
3034const createSchemaValidation = require (
3135 normalizeWebpackPath ( 'webpack/lib/util/create-schema-validation' ) ,
3236) as typeof import ( 'webpack/lib/util/create-schema-validation' ) ;
@@ -311,6 +315,13 @@ class ContainerPlugin {
311315 ContainerExposedDependency ,
312316 normalModuleFactory ,
313317 ) ;
318+
319+ if ( ! compilation . dependencyFactories . has ( EntryDependency ) ) {
320+ compilation . dependencyFactories . set (
321+ EntryDependency ,
322+ normalModuleFactory ,
323+ ) ;
324+ }
314325 } ,
315326 ) ;
316327
You can’t perform that action at this time.
0 commit comments