Unexpected 404s When Loading Remote Modules from different origins #3860
Unanswered
MatejFacko
asked this question in
Q&A
Replies: 0 comments
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.
-
When using @module-federation/runtime to dynamically load remote modules via registerRemotes and loadRemote, I encounter multiple 404 network requests when the remote app is hosted on a different origin .
Despite the 404s, the correct module eventually loads. However, the excessive failed requests may impact performance and mislead monitoring tools.
Expected Behavior
Only the correct absolute URL for the remoteEntry.js and other JS chunks should be requested, without extra or fallback 404s.
Actual Behavior
1. Running locally app where call registerRemotes([{ name: 'RemoteApp', entry: 'https://remote.origin/remoteEntry.js', type: 'module' }]).
2. I then call loadRemote('RemoteApp/Bootstrap', { from: 'runtime' }).
3. Multiple 404s occur before the correct resource is loaded
This only happens when entry points to a different origin.
Beta Was this translation helpful? Give feedback.
All reactions