export const qiankun = {
apps: microApps,
lifeCycles: {
beforeLoad: (app: any) => console.log('加载微服务:', app.name),
afterUnMount: [(app: any) => console.log('解除微服务:', app.name)],
},
// 绑定对应的路由
routes: [
{
path: '/subReport',
microApp: 'sub-app-report',
},
{
path: '/test/subReport',
microApp: 'sub-app-report',
insert: '/test',
},
],
};
如上:通过 insert 嵌入路由,但是没有编译

export const qiankun = {
apps: microApps,
lifeCycles: {
beforeLoad: (app: any) => console.log('加载微服务:', app.name),
afterUnMount: [(app: any) => console.log('解除微服务:', app.name)],
},
// 绑定对应的路由
routes: [
{
path: '/subReport',
microApp: 'sub-app-report',
},
{
path: '/test/subReport',
microApp: 'sub-app-report',
insert: '/test',
},
],
};
如上:通过 insert 嵌入路由,但是没有编译