基于vuejs为底座,single-spa 为框架的微前端示例工程
子项目均在 subprojects内, 四个项目互不关联,相互隔离。
- 本示例主要说明,微前端的简单示例,和如何远程加载微前端模块,所以需要启动四个项目工程
- single-spa 配置文件在src/single-spa-config.js。vue & react 项目的入口文件均有注释
- 如果还不了解,请前往single-spa.js 官网查阅文档
- https://single-spa.js.org
- Vuejs:
- cd sub-projects/sub-app-vuejs
- yarn install / npm install / cnpm install
- npm run serve-vue
- React:
- cd sub-projects/sub-app-react16
- yarn install / npm install / cnpm install
- npm run build
- npm run serve-react
- lugia:
- cd sub-projects/sub-app-lugia
- yarn install / npm install / cnpm install
- npm run build
- npm run serve-react
- Angular:
- cd sub-projects/sub-app-angular
- yarn install / npm install / cnpm install
- npm run build
- npm run serve-angular
- vuejs: 3000
- react: 3001
- helloReact: 3015
- angular: 3002