-
Notifications
You must be signed in to change notification settings - Fork 34
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
docs: Adding a rejected alternative to OEP-65 for Vite module federation #619
docs: Adding a rejected alternative to OEP-65 for Vite module federation #619
Conversation
Thanks for the pull request, @davidjoy! What's next?Please work through the following steps to get your changes ready for engineering review: 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. 🔘 Let us know that your PR is ready for review:Who will review my changes?This repository is currently maintained by Where can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:
When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
|
||
Another related alternative we considered was to write our own module federation implementation using Vite for its build. This option significantly means there's even less documentation and no community support, and Vite lacks support excluding dependencies from its output bundle, similar to how `Webpack externals <https://webpack.js.org/configuration/externals/>`_ works. We would need a mechanism like this to support a custom implementation. | ||
|
||
For all these reasons, we've rejected a Vite-based implementation of module federation. If, at a later date, a more viable Vite implementation of module federation is available, we might strongly consider migrating to Vite to be a great way of improving the performance and developer experience of our frontend builds. |
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.
Could we say "If, at a later date, a more viable Vite implementation of module federation is available or we no longer have runtime remote discovery as a hard requirement, we might strongly consider migrating to Vite..." ?
|
||
Unfortunately, both of these implementations have limitations and drawbacks that make them unsuitable as a way of implementing runtime module loading for Open edX: | ||
|
||
- We consider runtime remote discovery to be a required feature of our module federation implementation. This is the ability to register remotes - servers which host modules - at runtime, not just at build time. We do not want to rebuild our "hosts" - whether shell or another MFE - when we want to add a new remote. We want to be able to get our remote configuration at runtime and register remotes with the system when the application is running. |
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.
This is the first mention of the term "remote discovery" in the document. I think it'd be nice to have the description of this requirement (including using the term) earlier in the document (possibly in the "Capability: Runtime Module Loading" section).
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 good to me! Thanks for taking a serious look into it.
- Define runtime remote discovery. - Specify that we could revisit Vite if runtime remote discovery is no longer a hard requirement.
@bradenmacdonald and @brian-smith-tcril, great suggestions, I've added both. Thanks! |
@davidjoy 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future. |
…ion (openedx#619) * docs: Adding a rejected alternative to OEP-65 for Vite module federation * docs: review feedback of vite rejected alternative - Define runtime remote discovery. - Specify that we could revisit Vite if runtime remote discovery is no longer a hard requirement.
This PR adds another rejected alternative to OEP-65. We investigated using Vite for module federation and found it wasn't a viable alternative to Webpack module federation.