# 微前端、微应用 ## 作为单独项目开始 ```bash yarn serve ``` ## 接入主服务 将下面的路由接入主服务中: ```js import { RouteView } from '@/layouts' // 测试微前端 export default { path: '/testMicro/index', component: RouteView, name: 'testMicro', redirect: '/testMicro', meta: { title: '测试微前端', keepAlive: false }, children: [ { path: '/testMicro', name: 'testMicroHome', meta: { title: '测试微前端home', keepAlive: true, icon: 'home', hiddenHeaderContent: true } }, { path: '/testMicro/about', name: 'testMicroAbout', meta: { title: '测试微前端about', keepAlive: true, icon: 'home', hiddenHeaderContent: true } }, ] } ``` ## 编译 ```bash yarn build ```