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
Hi, my goal is to implement a behaviour like dynamic remotes import. However, federation runtime init, loadRemote, registerRemote will only happen when my host is loaded, this will be already too "late". I would like to have the fastest render of my remote as possible as my remote components could be amongst the first thing to be displayed on the page.
Therefore, I would like to prevent too much delay for the first contentful paint of my remote components.
I'm looking for a way to load my remoteEntry as soon as possible. I set a script tag in my webserver HTML response such as :
<script src="/path/to/remoteEntry.js"></script>
However, when downloading and executing the downloaded remoteEntry, I ended up with an error Uncaught TypeError: Cannot read properties of undefined (reading 'setGlobalFederationConstructor')
I understand that it's because the global window._FEDERATION_RUNTIME_CORE is not initialized yet, therefore the thrown error. That being explained, can module federation core be initialized outside of host ?
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
-
Hi, my goal is to implement a behaviour like dynamic remotes import. However, federation runtime init, loadRemote, registerRemote will only happen when my host is loaded, this will be already too "late". I would like to have the fastest render of my remote as possible as my remote components could be amongst the first thing to be displayed on the page.
Therefore, I would like to prevent too much delay for the first contentful paint of my remote components.
I'm looking for a way to load my remoteEntry as soon as possible. I set a
script
tag in my webserver HTML response such as :However, when downloading and executing the downloaded remoteEntry, I ended up with an error

Uncaught TypeError: Cannot read properties of undefined (reading 'setGlobalFederationConstructor')
I understand that it's because the global window._FEDERATION_RUNTIME_CORE is not initialized yet, therefore the thrown error. That being explained, can module federation core be initialized outside of host ?
Beta Was this translation helpful? Give feedback.
All reactions