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

DO NOT MERGE - feat(angular): add generator to migrate old mfe config #9366

Merged
merged 1 commit into from Mar 24, 2022

Conversation

Coly010
Copy link
Contributor

@Coly010 Coly010 commented Mar 16, 2022

Current Behavior

No automated method to migrate from current MFE configs to new MFE configs

Expected Behavior

Should have an automated method for migrating to new MFE configs considering:

  • shared npm packages' configs have not been modified
  • name used to identify Module Federation Container (uniqueName) matches the project name

Because every npm and workspace library dependent gets shared automatically, we can safely migrate those, whether defined or not in current configs.

We should always use tuple syntax for Host app's remote definitions, as they could have been changed and may not be possible to be inferred correctly.

If code produces unwanted results, user can revert the changes safely.

Things out of scope right now:

  • automatically writing code to set up overrides for shared packages that do not match config we're expecting
  • stripping away MFE config from existing configs, and merging the remaining config with the config returned from withModuleFederation
  • writing an actual migration, as we have not yet updated the existing MFE generators and may not for some time. However, the withModuleFederation approach is ready and can be used safely.
    • allowing people to try it out can get us feedback that we can use to further shape it.

@Coly010 Coly010 self-assigned this Mar 16, 2022
@nx-cloud
Copy link

nx-cloud bot commented Mar 16, 2022

☁️ Nx Cloud Report

CI ran the following commands for commit 7866388. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 8 targets

Sent with 💌 from NxCloud.

@vercel
Copy link

vercel bot commented Mar 16, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/nrwl/nx-dev/GofxKSRFyGiUc8NLgZTa1t9W8Vcp
✅ Preview: https://nx-dev-git-fork-coly010-angular-static-mfe-migration-nrwl.vercel.app

@Coly010 Coly010 changed the title feat(angular): add generator to migrate old mfe config DO NOT MERGE - feat(angular): add generator to migrate old mfe config Mar 21, 2022
Copy link
Member

@leosvelperez leosvelperez left a comment

Choose a reason for hiding this comment

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

There are just a couple of small typos left.

Apart from that, the change to use the word convert was done only in a few places, but almost all (if not all) files/dirs, the generator function name and other places are still using move. Could you update that so we keep a consistent naming?

Copy link
Member

@leosvelperez leosvelperez left a comment

Choose a reason for hiding this comment

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

LGTM! 🎉

@Coly010 Coly010 merged commit bf58aab into nrwl:master Mar 24, 2022
@Coly010 Coly010 deleted the angular/static-mfe-migration branch March 24, 2022 09:28
sidmonta pushed a commit to sidmonta/nx that referenced this pull request Apr 2, 2022
@github-actions
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 Mar 19, 2023
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.

None yet

2 participants