-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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(react): Add federate-module generator #19286
feat(react): Add federate-module generator #19286
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 6f952db. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 6 targets
Sent with 💌 from NxCloud. |
f9c3f63
to
5455d0c
Compare
5455d0c
to
0b324dc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
i think there are a couple of things missing.
When we add the federated module, we should also add a path alias to the root tsconfig file following the same format.
”remote-app/MyModule”: [“./path/to/file”]
The only other things I’d love to have relate to testing.
-
can we test an integrated repo, where the
lib
is a separate project? The remote could be in apps/ but the file we want to federate is in libs/ - perhaps we should update the description on thepath
flag in the schema to mention workspace root.
You can see an example of where I’ve done this in an Angular app: https://github.com/Coly010/mf-federated-service-example/blob/main/apps/auth-remote/module-federation.config.js -
It would be great if our e2es tested federating a path, and then having that path be consumed in the host, and ensuring that build works and when served, the content of the federated module renders correctly.
i think the e2es you have currently which check if the files exist etc could become unit tests.
but overall this is awesome! 🎉 great work
0b324dc
to
d19ffde
Compare
d19ffde
to
bff8f78
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One typo, but otherwise this looks great! 🎉
This is an exciting feature to have!
bff8f78
to
695dd25
Compare
695dd25
to
402f02f
Compare
402f02f
to
6f952db
Compare
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. |
This PR contains
A federate module generator which should do a few things:
Command
module-federation.config.js
to add a new entry to theexposes
property for the new module