Vite module federation #22646
Replies: 17 comments
-
I believe this is planned. |
Beta Was this translation helpful? Give feedback.
-
Also interested in this. |
Beta Was this translation helpful? Give feedback.
-
https://github.com/module-federation/vite |
Beta Was this translation helpful? Give feedback.
-
Any updates on this? Also, would it be reasonable to assume a default webpack host/remote application can be (automatically) migrated to Vite when this feature hits? E.g. using https://nx.dev/packages/vite/generators/configuration |
Beta Was this translation helpful? Give feedback.
-
Roadmap is here: #12836 I think we'll need more upvotes/noise to get this feature considered. |
Beta Was this translation helpful? Give feedback.
-
For some color: NX 16 is working well for us right now. We're using it to build a shared operations portal where different teams are maintaining different sections (front and back ends) with a shared parent frontend/UI shell. The eventual goal is for separate major sections to be integrated via MF. We are very happy with vite for our frontends and we do not want to introduce webpack unless we absolutely have to. We can absolutely get module federation working with vite, but the developer experience in NX is abysmal. With Webpack, nx knows there are dependencies and how to spin up the parent shell and simple file server (with watcher) so that you can get live previews. Also With vite we've got to manually define dependencies ourselves. We can "fake" MF by having a dummy that imports the federated module directly but testing, configuration, etc are all outside of NX. It introduces a lot of headache. |
Beta Was this translation helpful? Give feedback.
-
This library would be useful for getting module federation working in a way that is similar to webpack's implementation: https://github.com/originjs/vite-plugin-federation |
Beta Was this translation helpful? Give feedback.
-
Any updates? |
Beta Was this translation helpful? Give feedback.
-
I'm also interested in this. I started looking at Origin.js, and the config API seems identical to webpacks. They even support running mixed webpack/vite bundlers between the different hosts and remotes. |
Beta Was this translation helpful? Give feedback.
-
There is currently no official support from the Module Federation team for I know that some people have had success with https://github.com/originjs/vite-plugin-federation We are still evaluating options currently for official support from Nx. |
Beta Was this translation helpful? Give feedback.
-
Any updates on this? My team is thinking of migrating from VITE to Webpack just so we can use NX MF, but if VITE native support is in the horizon then I'll be great |
Beta Was this translation helpful? Give feedback.
-
+1 , looking forward for VITE module federation support |
Beta Was this translation helpful? Give feedback.
-
+1 looking for vite module federation support on build along with storybook |
Beta Was this translation helpful? Give feedback.
-
is there any way to do the module federation fro NX vite app? |
Beta Was this translation helpful? Give feedback.
-
Is there any update on this? We have tried using Originjs with @nx/vite and keep running into issues that cause it to fail builds or not get the remote loaded |
Beta Was this translation helpful? Give feedback.
-
Do you plan to add MF on Vite? It's much faster then WP5
It'll bee greate, if you write article how to migrate from WP5 to Vite for MF
Beta Was this translation helpful? Give feedback.
All reactions