最近搞微前端路由分发真的头大,好几个子应用路由冲突了,改来改去还是有问题...
// 路由前缀统一处理了一下
const prefix = '/app1'
router.beforeEach((to, from, next) => {
if (!to.path.startsWith(prefix)) {
next(`${prefix}${to.path}`)
} else {
next()
}
})
登录/注册