[@nx/angular/mf] setRemoteDefinition(): A stateful way to add new remotes dinamically #27050
Closed
menosprezzi
started this conversation in
Feature Requests
Replies: 3 comments
-
I have the same problem. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I've already left a PR open to address that. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Awesome! The PR was approved! Closing this discussion by now! |
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
-
Hello Nrwl team and Nx community!
At my current company, we are using angular/mf from some years, and fully replaced angular-architects package to the best devx of @nx/angular/mf!
We are building a set of auto-configurables MicroFrontEnds based on Libs.
In these libs we expose the main contract of the MFE (preventing breaks in our consumers), share declarations/injection tokens and we do an auto-configuration, setting up the MFE remote based on the environment and the host Angular version, because we need to maintain multiple MFE versions published so we can do a smooth rollout between the many consumers.
The problem is that
@nx/angular/mf
ssetRemoteDefinitions
method overwrite the previous state (as expected), so if a consumer uses more than 1 of this solutions, the state is overwritten and the last MFEs wont load properly anymore.Therefore, I'd like to propose a new API called
addRemoteDefinition(remoteName: string, remoteUrl: string)
(orsetRemoteDefinition
) that adds or replace a new remote definition in the remotes map, without overwrite it.If you guys agree, I'll be able and happy to contribute with a PR!
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions