js-park92 / webpack-federated-react

An example of how to use webpack federated modules with shared library.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

webpack-federated-react

An example of how to use webpack federated modules with shared library.

Getting started

Run the following commands in the root of the project directory.

yarn

yarn start

Folder structure

Every folder in ./packages folder is either a webpack federated module or a shared package that has required codes that are shared.

./packages/container module is the main module that has routes and layout. ./packages/shared-lib is the shared library that are meant for functions that need to be in multiple module.

./packages/users and ./packages/dashboard folders are the example of individual apps that could be plugged into container app.

Webpack config files

./packages/webpack.common.js has the common configuration that are shared in all the modules, and individual module has a webpack folder that has development and production config files.

About

An example of how to use webpack federated modules with shared library.


Languages

Language:JavaScript 93.0%Language:HTML 7.0%