You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello. First, I would like to thank you for providing such a great library, which has been a tremendous help in building MFA.
What I am trying to achieve in my project is to integrate a remote application at runtime during the SSR process to generate HTML.
I am using NestJS as the SSR server. Everything seems to be working fine, but I encountered one issue. In a NestJS project configured with pure ESM, an error occurs when trying to load a remote application via loadRemote provided by @module-federation/runtime
The host application is a pure ESM-configured NestJS application, and the remote application exposes React components using Webpack.
Are there any considerations for using the runtime API in an ESM-configured application when dealing with remotes? I have confirmed that it works correctly in a NestJS application using the CJS module format.
I have created a small repository for testing. The repository contains a NestJS application in ESM module format, a NestJS application in CJS format, and a remote application. You can experience the error when running the server in ESM.
From my investigation, it seems the error is triggered when executing this code
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello. First, I would like to thank you for providing such a great library, which has been a tremendous help in building MFA.
What I am trying to achieve in my project is to integrate a remote application at runtime during the SSR process to generate HTML.
I am using NestJS as the SSR server. Everything seems to be working fine, but I encountered one issue. In a NestJS project configured with pure ESM, an error occurs when trying to load a remote application via
loadRemote
provided by@module-federation/runtime
The host application is a pure ESM-configured NestJS application, and the remote application exposes React components using Webpack.
Are there any considerations for using the runtime API in an ESM-configured application when dealing with remotes? I have confirmed that it works correctly in a NestJS application using the CJS module format.
I have created a small repository for testing. The repository contains a NestJS application in ESM module format, a NestJS application in CJS format, and a remote application. You can experience the error when running the server in ESM.
From my investigation, it seems the error is triggered when executing this code
I would appreciate any help on this issue.
Beta Was this translation helpful? Give feedback.
All reactions