qiankun 微前端
接入步骤
- 主应用注册子应用
- 子应用导出 bootstrap / mount / unmount 三个生命周期
- webpack
output.library+libraryTarget: umd
样式隔离
开启 sandbox: { strictStyleIsolation: true } 用 Shadow DOM。
全局通信
initGlobalState + onGlobalStateChange 替代 EventBus。
output.library + libraryTarget: umd开启 sandbox: { strictStyleIsolation: true } 用 Shadow DOM。
initGlobalState + onGlobalStateChange 替代 EventBus。