https://github.com/trystan2k/webpack-module-federation-example
https://github.com/trystan2k/webpack-module-federation-example
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/trystan2k/webpack-module-federation-example
- Owner: trystan2k
- License: mit
- Created: 2021-08-09T13:26:34.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2023-01-17T10:19:26.000Z (over 3 years ago)
- Last Synced: 2025-04-14T08:57:56.022Z (about 1 year ago)
- Language: JavaScript
- Size: 2.18 MB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
### webpack-module-federation-example
# Lerna + Yarn
In this case it uses Lerna + Yarn workspace to manage the shared dependencies and link between packages in the monorepo. And also it uses Lerna to execute commands in all packages at once.
## Cons & Pros
### Pros
- It is was not generated using create-react-app we have access to Webpack configuration.
- All apps are in a Monorepo that can also contain libraries (like a design system or shared components)
- Module federation works as expected
### Cons
- New apps needs to be generated manually or via a custom CLI as we can't use CRA.
- Uses Yarn, which would require possible changes in CI/CD pipelines
# Steps
Execute `yarn` to install all dependencies
To start the MFEs in development mode, just execute:
`yarn develop`
To build for production execute the command:
`yarn build`
Once the build is finished, you can start a simple local web server with:
`yarn start`