Simple
Works with any javascript framework. Build your micro-frontend system just like using with iframe, but not iframe actually.
Probably the most complete micro-frontends solution you ever met🧐

npm install qiankunyarn add qiankunpnpm add qiankunimport { registerMicroApps, start } from 'qiankun';
// register micro apps
registerMicroApps([
{
name: 'reactApp',
entry: '//localhost:7100',
container: '#yourContainer',
activeRule: '/yourActiveRule',
},
{
name: 'vueApp',
entry: { scripts: ['//localhost:7100/main.js'] },
container: '#yourContainer2',
activeRule: '/yourActiveRule2',
},
]);
// start qiankun
start();/**
* bootstrap will only be called once when the micro application is initialized
* mount will be called every time the micro application enters
* unmount will be called every time the micro application leaves
*/
export async function bootstrap() {
console.log('react app bootstraped');
}
export async function mount(props) {
ReactDOM.render(<App />, props.container ? props.container.querySelector('#root') : document.getElementById('root'));
}
export async function unmount(props) {
ReactDOM.unmountComponentAtNode(
props.container ? props.container.querySelector('#root') : document.getElementById('root'),
);
}Almost no intrusion to existing applications, only need to expose necessary lifecycle functions
Supports both route-based and manual loading of micro applications
Complete sandbox solution with JS isolation and CSS isolation
Supports preloading, caching and other performance optimization solutions
| GitHub Discussions | DingTalk Group | WeChat Group |
|---|---|---|
| qiankun discussions | view group QR code |