Skip to content

feat(module-federation): move common executor logic to module-federation package#29151

Merged
jaysoo merged 5 commits intomasterfrom
module-federation/move-common-executor-utils
Dec 3, 2024
Merged

feat(module-federation): move common executor logic to module-federation package#29151
jaysoo merged 5 commits intomasterfrom
module-federation/move-common-executor-utils

Conversation

@Coly010
Copy link
Copy Markdown
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
@vercel
Copy link
Copy Markdown

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

@nx-cloud
Copy link
Copy Markdown
Contributor

nx-cloud Bot commented Dec 2, 2024

@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
Copy Markdown
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
Copy Markdown
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
@jaysoo jaysoo deleted the module-federation/move-common-executor-utils branch December 3, 2024 13:15
@github-actions
Copy link
Copy Markdown
Contributor

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