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 {
73
73
onLoad ( args ) {
74
74
const { exposeModuleFactory, exposeModule, id } = args ;
75
75
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
78
77
79
78
if ( typeof window === 'undefined' ) {
79
+ let exposedModuleExports : any = moduleOrFactory ( ) ;
80
+
80
81
const handler : ProxyHandler < any > = {
81
82
get ( target , prop , receiver ) {
82
83
// Check if accessing a static property of the function itself
You can’t perform that action at this time.
0 commit comments