react-webpack-MF
react-webpack-MF copied to clipboard
A Webpack Module Federation Case In React
react-webpack-MF
A complete Webpack Module Federation Case with React.
一个应用Webpack Module Federation的React项目案例
project directory
lib-app
It is a low-level or basic app, which exposes libraries like react, react-dom. It is a pure remote
底层App,暴露了一些库模块:react,react-dom。它是一个纯粹的remote
component-app
It is a middle-level app, which depends on modules exposed from lib-app : react ,react-dom. In the meantime, it also exposes components: Dialog, Button to another app called main-app.
组件层App,依赖lib-app暴露的react、react-dom模块,也暴露了一些组件如对话框Dialog、按钮Button给另一个app:main-app
It is both host and remote.
它既是host也是remote
main-app
the top-level app, which depends on lib-app and component-app.
上层App,依赖lib-app和component-app应用。
It is a pure host.
它也是一个纯粹host。
how to use
npm installnpx lerna bootstrapnpm run startafter all the commands done, open your browser athttp://localhost:3002