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

Import Maps Support #2001

Closed
2 tasks done
ScriptedAlchemy opened this issue Jan 20, 2024 · 3 comments
Closed
2 tasks done

Import Maps Support #2001

ScriptedAlchemy opened this issue Jan 20, 2024 · 3 comments
Labels

Comments

@ScriptedAlchemy
Copy link
Member

ScriptedAlchemy commented Jan 20, 2024

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:

  1. 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.

  2. 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

@zhoushaw zhoushaw added the ✨ enhancement New feature or request label Jan 22, 2024
Copy link
Contributor

Stale issue message

@zackarychapple
Copy link
Collaborator

bump

Copy link
Contributor

Stale issue message

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants