Amazing Video! I jhave a quick question, I have a remote app on webpack+react (react-version:17.0.2)and wanted to use it inside host app using vite+remix (react-version:19.0.0) without sharing any packages, do you have any idea about this ?
Hey, thanks for the thumbs up. Your problem is a little tricky because not only do you have different react versions, but you also have 2 different bundlers bundling them. 1. I haven't tried this but based on my quick research, you'll have to first update the ModuleFederationPlugin config in your webpack+React app, with the requiredVersion and singleton properties. This will prevent any version conflicts and ensure the Remote uses it's own React version. You can check this link from webpack on how it's done. webpack.js.org/plugins/module-federation-plugin/#additional-examples 2. Secondly, inside the vite app, you'll have to empty the shared dependency object. On paper, this should work, but again as I mentioned, I haven't tried this myself so maybe you can do this and let me know if it worked for you.
@@kalyanaute-z5d ideally sharing the route object along with the provider should work as expected. Is it an issue with vite or vite-plugin-federation? Maybe if there's an issue thread or an error block that I can look at, I'll be able to help.
Best Tutorial to learn in depth about Module Federation, it contains almost everything that is required to setup module federation.
Thank You🙌
@@ShashankSMogaveera-M12 thanks ✌️✌️✌️
Amazing video!!!
I needed to convert a large project into microfrontends. You helped me a lot!
🇧🇷
@@sousafernando1 glad I could help ✌️
Amazing Video! I jhave a quick question, I have a remote app on webpack+react (react-version:17.0.2)and wanted to use it inside host app using vite+remix (react-version:19.0.0) without sharing any packages, do you have any idea about this ?
Hey, thanks for the thumbs up. Your problem is a little tricky because not only do you have different react versions, but you also have 2 different bundlers bundling them.
1. I haven't tried this but based on my quick research, you'll have to first update the ModuleFederationPlugin config in your webpack+React app, with the requiredVersion and singleton properties. This will prevent any version conflicts and ensure the Remote uses it's own React version. You can check this link from webpack on how it's done.
webpack.js.org/plugins/module-federation-plugin/#additional-examples
2. Secondly, inside the vite app, you'll have to empty the shared dependency object.
On paper, this should work, but again as I mentioned, I haven't tried this myself so maybe you can do this and let me know if it worked for you.
@@akileshrao Thanks for your response. But sadly, it is not working.
i think for vite there is some issue for navigation when u use routing
@@kalyanaute-z5d ideally sharing the route object along with the provider should work as expected. Is it an issue with vite or vite-plugin-federation? Maybe if there's an issue thread or an error block that I can look at, I'll be able to help.