https://github.com/lovetingyuan/single-spa-example
example of single-spa including vue, react, angular
https://github.com/lovetingyuan/single-spa-example
Last synced: 2 months ago
JSON representation
example of single-spa including vue, react, angular
- Host: GitHub
- URL: https://github.com/lovetingyuan/single-spa-example
- Owner: lovetingyuan
- License: mit
- Created: 2020-03-20T06:18:09.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-05-11T22:41:13.000Z (about 4 years ago)
- Last Synced: 2025-04-01T17:11:54.324Z (3 months ago)
- Language: HTML
- Homepage:
- Size: 5.18 MB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 32
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
### single-spa example including vue, react and angular.
1. `yarn install` and `cd modules && npx lerna bootstrap`
2. `yarn serve` to start development at `http://localhost:3000`Micro app set up process:
1. add config `singleapp` in `modules/package.json`
```json
{
"new-app": {
"port": 8081,
"mountPath": "/new-app-route",
"publicPath": "/new-app/",
"output": "dist",
"default": false
}
}
```2. You have to ensure that assets url in your app must be complete url(with http or https) in development.
For `webpack`, you could set `output.publicPath`.3. You have to offer `singlespa:serve` and `singlespa:build` npm scripts to perform development and build.
4. use `window.singleApp.startApp(appName, singleSpaLifecycles)` to start your app.