vue-microfrontends/root-config
概要
Start here if you're learning microfrontends
学習・教育計測したスター増加
- 24時間
- 0
- 7日間
- 0
- 15日間
- 0
- 1か月
- 履歴を収集中
期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。
README.md
オリジナルVue Microfrontends root-config
What is this?
This is an example microfrontend repo demonstrating how to use single-spa. You can see the code running at https://vue.microfrontends.app.
How does it work?
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://vue.microfrontends.app/importmap.json.
This project uses Vue and was created with the create-single-spa CLI. It uses webpack and babel.
Whenever a pull request is merged to master, 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.

Local development
Tutorial video: youtube / bilibili
There are two ways to do local development. It is preferred to do one module at a time, whenever possible.
One module at a time
cd root-config
yarn install
yarn start --https
Go to https://localhost:9000/vue-mf-root-config.js and verify that you are able to load the file without any SSL problems. To solve SSL problems, see these instructions.
Now, go to https://vue.microfrontends.app. In the browser console, run the following:
localStorage.setItem("devtools", true);
Refresh the page. Click on the tan / beige rectangle:

Set an import map override to 9000.

Refresh the page. Your local code for this module will now be running on https://vue.microfrontends.app. You may make changes locally and refresh the page to see them.
All modules together
Run the root-config project locally:
cd root-config
yarn install
yarn start
Now follow the steps above for "One module at a time" for each of the modules you wish to work on.
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.
関連プロジェクトを探す
読み込み中…