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): move common executor logic to module-federation package #29151

Merged
merged 5 commits into from
Dec 3, 2024

Conversation

Coly010
Copy link
Contributor

@Coly010 Coly010 commented Dec 2, 2024

Current Behavior

The logic for the module-federation-dev-server and module-federation-ssr-dev-server is duplicated across Angular, React and Rspack.

The majority of this logic is the same, and the duplication causes an increased maintenance tax.

Expected Behavior

Move the logic into a utility that is exposed from @nx/module-federation.

@Coly010 Coly010 self-assigned this Dec 2, 2024
@Coly010 Coly010 requested review from a team as code owners December 2, 2024 17:59
@Coly010 Coly010 requested review from JamesHenry and jaysoo December 2, 2024 17:59
Copy link

vercel bot commented Dec 2, 2024

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

1 Skipped Deployment
Name Status Preview Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Visit Preview Dec 3, 2024 10:40am

@Coly010 Coly010 force-pushed the module-federation/move-common-executor-utils branch from b9ef5de to 1ce9ecb Compare December 3, 2024 09:24
@Coly010 Coly010 force-pushed the module-federation/move-common-executor-utils branch from 1ce9ecb to 98ad59b Compare December 3, 2024 10:14
@Coly010 Coly010 force-pushed the module-federation/move-common-executor-utils branch from 98ad59b to ca75e46 Compare December 3, 2024 10:37
readProjectsConfigurationFromProjectGraph,
} from '@nx/devkit';

export async function startRemoteIterators(
Copy link
Member

Choose a reason for hiding this comment

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

nit: What about just startRemotes, serveRemotes or runRemotes? That's what the function does and the iterators are just an implementation detail.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is an impl detail, but I think it makes sense in this case as it indicates that you're getting iterators for both static and dev remotes, which are then combined thereafter.

If we wanted to rename, runRemotes might be the best option, but that can be a cleanup for a different time if we decide on it.

@jaysoo jaysoo merged commit 5448046 into master Dec 3, 2024
6 checks passed
@jaysoo jaysoo deleted the module-federation/move-common-executor-utils branch December 3, 2024 13:15
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 21, 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.

3 participants