https://github.com/navono/modular-frontend
A simple demo for single-SPA and lerna
https://github.com/navono/modular-frontend
lerna react single-spa
Last synced: 29 days ago
JSON representation
A simple demo for single-SPA and lerna
- Host: GitHub
- URL: https://github.com/navono/modular-frontend
- Owner: navono
- License: mit
- Created: 2019-03-14T08:11:25.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-04-09T04:43:23.000Z (about 7 years ago)
- Last Synced: 2025-02-26T03:36:26.597Z (over 1 year ago)
- Topics: lerna, react, single-spa
- Language: JavaScript
- Homepage:
- Size: 779 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Modular-frontend
使用 `lerna` 与 `single-spa` 进行构建与管理。最初源码来自于 [Fantasy9527](https://github.com/Fantasy9527/microfrontend-base-demo)
## Dev
TODO
## Build
运行:
> yarn build
目前还没有实现 `project.config.js` 的自动生成与更新,所有需要手动增加 `project.config.js` 文件,同时增加以下内容:
```js
module.exports = {
projects: [
{
"name": "basemodule",
"prefix": "/basemodule/",
"main": "/basemodule/main.js",
"store": "/basemodule/store.js",
"base": true
},
{
"name": "submodule",
"path": ["/module1"],
"prefix": "/submodule/",
"main": "/submodule/main.js",
"store": "/submodule/store.js"
}
]
}
```
然后可以使用 `http-server` 进行验证:
> npx http-server ./build