How to load a remote only after one first has been loaded? #2096
Unanswered
felipeloge
asked this question in
Q&A
Replies: 1 comment
-
Containers should not inject remotes multiple times, if the remote is the same name, then the federation runtime will see that the remotes are all the same global name and not load the same thing again. |
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
-
Hey all,
I have a situation that I need to load a remote app only after the first one has been loaded.
I have the following Webpack module federation config in my host app:
So to give more context, both
@qikwebkit
and@qikwebkit-orders
remotes are projects in different repositories.The
@qikwebkit-orders
remote app is in a monorepo built with NX and also consumes the remote@qikwebkit
one that I have configured based on NX tools for module federation.What's the issue?
In my host app, when the application starts, it's loading the
@qikwebkit
remoteEntry.js file as duplicated.@qikwebkit-orders
without the query param because NX tool for module federation is not flexible at this pointSo the ideal solution would be to load only the first one (with timestamp as query param), however it would be necessary to wait the
@qikwebkit
remote to be loaded first and then@qikwebkit-orders
could be loaded.Resuming... Is that possible to load
@qikwebkit-orders
remote only after@qikwebkit
remote is loaded?Is there a way to handle with that using the runtime plugin? or any another approach?
Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions