Replies: 1 comment
-
use preload tags instead? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
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