core
core copied to clipboard
Import Maps Support
Problem Description: Enhancing Federation Runtime for Import Maps
The federation runtime currently operates with minimal direct coupling to the bundler. This setup positions us to potentially support import maps in our SDK or runtime. Adopting import maps would move the federation ecosystem towards bundler independence, aligning more with native platform capabilities. However, this could mean facing the limitations of native platforms compared to compilers.
Integrating import maps would solidify federation as a standard in the Micro Frontend (MFE) space. This is due to the growing reliance of the ecosystem on the runtime library of Micro Frontend Platforms (MFP), rather than on bundler-specific runtime components.
Proposed Solution
To leverage import maps effectively, we suggest:
-
Developing new bindings for module sharing, or creating a new runtime plugin. This would enable the share scope to interact directly with the import map instead of a JavaScript object.
-
Implementing necessary shims in a manner similar to native federation, but integrated within our runtime instead of relying on an external system.
Alternative Approaches
No response
Additional Context
- While many aspects could be supported. There will be limits. Use of federation beyond the browser may not be possible without a bundler. The limitations would imposed by the platform, unlike the bundler. But even limited versions would be better choice as federation has a large ecosystem based on its runtime which would be quite useful.
- Recommendations would still be to use federation in tandem with a bundler.
Validations
- [X] Reviewed the Contributing Guidelines.
- [X] Verified no existing issue requests the same feature, to avoid duplicates.
Stale issue message
bump
Stale issue message