npx create-mf-app-> [app_1] -> Application -> framework -> style framework- create multiple apps based on the need
- cd into the projects and run
npm i
Learned from this video https://www.youtube.com/watch?v=lKKsjpH09dU&ab_channel=freeCodeCamp.org
- Cannot use router inside router, so export all the components from app1 to main app and recreate the routes.
- We can only use the ejected webpack.config to render the Module Federation Micro FE, but the exported CRA app cant be used in MF apps.
- To fix this issue used
mf-crapackage, that can export our components fromCRAapps. -https://socket.dev/npm/package/mf-cra - Removed
mf-cra, as not to have any dependency over othe packages fo MF, copied the webpack code to local and fixed the process. - Webpack config cannot be overriten in default
react-script, we have to eject the project and have to use it or we can u additional package to overrite the webpack config likereact-app-rewire