-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
How much work is needed to allow rollup to be a remote? #11
Comments
Going to consider switching to webpack first |
@filipot I would consider Webpack. I do not have the time or drive to re-visit this at the moment. I'm keeping this open to potentially re-visit in the future. |
@jacob-ebey Is this something you'd be open to a contribution? This would be super helpful in our use case. We're using rollup in our plugin system. Enabling plugins to become remotes instead of switching to webpack would be great then! I'd be happy to try to invest some effort in contributing to this. |
@LukasHirt Always open for contributions, no one's stopping you ;) |
@LukasHirt You may also consider using snowpack, i think that is the direction where im heading. FredKSchott/snowpack#1098 |
@jacob-ebey is there a design doc somewhere that specs module federation and how different bundlers need to interop? I'm interested in this, and may even contribute, but webpack MF features seem to rely on _webpack* variables, whereas this projects seems to use federation. Is it that the two simply diverged? |
@emlio-martinez message me on twitter @ebey_jacob and we can setup a call to talk about things. I don't know of any official design docs, but you can mainly think of __webpack variables as it's module resolution stuff as it doesn't use esm imports. The main api is the get and init where sharing context is provided. |
This effective thing with module federation is that its a webpack specific problem really, from what I can tell. All its doing is calling a custom wrapped runtime on a remote. You can do this with es modules today as far as I can tell, having looked at the code on both sides of the coin here. This is what dynamic import handles. Unless there is something critical I misunderstand about module federation (this could be the case, I'm not going to lie, the documentation around this is not great), there's no magic here. Its the equivalent of just dynamically importing your application at runtime as needed. Adding a global "module cache" would allow you to do this in a way where you can import the module after bootstrap and it "mount" it when needed. |
Having rollup be a remote is really useful for my project. I would love to see it be realized. I could potentially sponsor this project.
Btw, amazing work so far with module federation!
@jacob-ebey
The text was updated successfully, but these errors were encountered: