File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
packages/nextjs-mf/src/plugins/container Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @module-federation/nextjs-mf ' : patch
3+ ---
4+
5+ only call module factory in valid conditions in runtime plugin
Original file line number Diff line number Diff line change @@ -73,10 +73,11 @@ export default function (): FederationRuntimePlugin {
7373 onLoad ( args ) {
7474 const { exposeModuleFactory, exposeModule, id } = args ;
7575 const moduleOrFactory = exposeModuleFactory || exposeModule ;
76- if ( ! moduleOrFactory ) return ; // Ensure moduleOrFactory is defined
77- let exposedModuleExports : any = moduleOrFactory ( ) ;
76+ if ( ! moduleOrFactory ) return args ; // Ensure moduleOrFactory is defined
7877
7978 if ( typeof window === 'undefined' ) {
79+ let exposedModuleExports : any = moduleOrFactory ( ) ;
80+
8081 const handler : ProxyHandler < any > = {
8182 get ( target , prop , receiver ) {
8283 // Check if accessing a static property of the function itself
You can’t perform that action at this time.
0 commit comments