Unexpected 404s When Loading Remote Modules from different origins #3860
Unanswered
MatejFacko
asked this question in
Q&A
Replies: 2 comments
-
I also encountered same issue. Fetch of javascript files will resolve as 404 first, than 200. Css files are resolved as 200 even though content is not there because its fetched from wrong origin what leads to broken style. |
Beta Was this translation helpful? Give feedback.
0 replies
-
public path auto? you sure chunks are fetched from right origin and not trying to load from hosts |
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.
-
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