React root-config

CircleCI

What is this?

This is an example microfrontend repo demonstrating how to use single-spa. You can see the code running at https://react.microfrontends.app.

How does it work?

Full article

This repository is a javascript project that creates a javascript bundle that is an in-browser javascript module (explanation on youtube / bilibili). The currently deployed version of the in-browser module can be seen at https://react.microfrontends.app/importmap.json.

This project uses React and was created with the create-single-spa CLI. It uses webpack and babel.

Whenever a pull request is merged to main, CircleCI builds and deploys the project. The "workflows" view (pictured below) can be seen if you are logged into CircleCI. Deployments for this in-browser module are completely independent of deployments for any other module.

image

Local development

Full documentation

Tutorial video: youtube / bilibili

git clone https://github.com/react-microfrontends/root-config.git
cd root-config
yarn install
yarn start
open http://localhost:9000

Adapting for your organization

Feel free to fork and modify any files you would like when doing a proof of concept for your organization. When it's time to actually create / adapt your organization's projects, consider using create-single-spa instead of forking this repository.