-
-
Notifications
You must be signed in to change notification settings - Fork 369
Description
My remoteEntry is built using:
"vite": "6.4.1"
"@module-federation/vite": "1.9.0"
However, the remoteEntry itself should not cause concern. It is a proper MF Remote in ESM format without circular dependencies, including get and init, and it exports a React component for SSR.
The consumer of this remote is a React server-side renderer running in the Node runtime, using:
"vite": "6.4.1"
"@module-federation/enhanced": "0.21.3"
Although Vite is primarily a browser runtime-oriented application builder, it also supports SSR runtimes, so this should not be an issue.
The application consistently throws the error ReferenceError: default is not defined immediately after the remote’s dynamic import statement.
Debugger evaluation shows that await import() resolves as a Module, but accessing attributes on it is not available.
This module is handled inside the importModuleDynamically callback of vm.SourceTextModule from module-federation/core/sdk/node.
I will share a PR addressing this.
PR) #4217