-
Notifications
You must be signed in to change notification settings - Fork 101
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
Adopt the new federation runtime #518
Comments
hey @ScriptedAlchemy, you are talking about MF 1.5 correct? I'm all up for it, love the idea. Perhaps runtime plugins would actually help us solve the issue where host app can't define remotes (I think it was related to converting some part of initialisation logic to promise so RN wasn't initialising correctly). I wasn't involved in Re.Pack development at the time where Could you point me to some resources on what features MF 1.5 offers? |
yeah so for RN this is what i was thinking which may help the chunk manager thing. Then for defining remotes etc, we can do things like this: Resources: We are also finalizing a new api for adding remotes on the fly: Heres a post i wrote about it: Basically youd just swap over to module-federation/enhacend, then any runtime plugins you want to make you can just add as array like i do in examples. If you want pure at runtime you can do that too with the module-federation/runtime If you use enhanced, then all it does is init the runtime package under the hood and pass options. If its something youd want to adopt, im down to help. I dont know a ton of RN but the main thing i had in mind where i could be helpful is with a runtime plugin for chunk handlers that RN needs. Like node plugin, you make a custom chunk handler plugin. However i discovered i can do same with runtime plugin and since runtime plugins and federation runtime are embedded into the runtime chunks, they boot before any app code does, it boots along with webpacks runtime etc. We also just rolled out data manifest plugin and preload hooks so if chunkManager needs that upfront in totality, we have a hook in runtime for preloadAssets etc. (was just merged) |
This issue has been marked as stale because it has been inactive for 30 days. Please update this issue or it will be automatically closed in 14 days. |
This issue has been marked as stale because it has been inactive for 30 days. Please update this issue or it will be automatically closed in 14 days. |
Describe the feature
I have recently redesigned module federation and introduced the concept of runtime plugins, while they have many uses - i think the new runtime could be a prime candidate for repack as i recall we had to do some special things for ChunkManager, this could likely be moved into a runtime plugin and not require a full webpack plugin for federation to work (i do the same for node.js now too)
Motivation
More flexability to end user and most likely a cleaner implementation of federation for RN apps
Related Issues
The text was updated successfully, but these errors were encountered: