You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

783 B

微前端、微应用

作为单独项目开始

yarn serve

接入主服务

将下面的路由接入主服务中:

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 }
    },
  ]
}

编译

yarn build