Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(module-federation): alias host and remote generators to consumer and producer #29190

Merged
merged 1 commit into from
Dec 4, 2024

Conversation

Coly010
Copy link
Contributor

@Coly010 Coly010 commented Dec 4, 2024

Current Behavior

Our Module Federation support across Angular and React contains Host and Remote generators.
The module-federation.io docs have started to shift towards Consumer and Producer terminology for better translation of meanings across languages.

Expected Behavior

To stay consistent with official terminology, add aliases for the host and remote generators to allow for the new terminology. i.e. host -> consumer, remote -> producer.

Therefore the following are all valid

nx g host shell --remotes=remote1
nx g host shell --producers=producer1
nx g consumer shell --remotes=remote1
nx g consumer shell --producers=remote1

nx g remote remote1 --host=shell
nx g remote remote1 --consumer=shell
nx g producer producer1 --host=shell
nx g producer producer1 --consumer=shell

@Coly010 Coly010 requested review from a team as code owners December 4, 2024 11:36
@Coly010 Coly010 self-assigned this Dec 4, 2024
@Coly010 Coly010 requested review from mandarini and jaysoo December 4, 2024 11:36
Copy link

vercel bot commented Dec 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nx-dev ✅ Ready (Inspect) Visit Preview Dec 4, 2024 11:49am

"examples": [
{
"command": "nx g federate-module MyModule --path=./src/component/my-cmp.ts --remote=my-remote-app --remoteDirectory=apps/my-remote-app",
"command": "nx g federate-module MyModule --path=./src/component/my-cmp.ts --remote=myRemoteApp --remoteDirectory=apps/myRemoteApp",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the description be updated from my-remote-app to myRemoteApp?

@Coly010 Coly010 merged commit aefafc5 into master Dec 4, 2024
6 checks passed
@Coly010 Coly010 deleted the module-federation/alias-generators branch December 4, 2024 16:45
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants