Closed chj-damon closed 3 years ago
可以 进入到 example/vue2 的文件夹下 tyarn 或 cnpm i 后, npm run dev 得到和启动vue2页面,得到该页面地址后 比如是:http://localhost:8000 等 ,配置antdFront/src/config/route.js:
{
name: "微前端",
path: "/micro",
icon: "PaperClipOutlined",
children: [
// {
// name: "material-ui",
// path: "material/*",
// access: "microOpen",
// component: "http://localhost:8002" // 微前端配置
// },
{
name: "vue2测试",
path: "vue2/*",
access: "microOpen",
component: "http://localhost:8000", // 微前端配置
},
]
}
找到以上部分,将该处的component 改成 vue2的地址。 后npm run dev 即可查看到效果...
nice,谢谢!
http://127.0.0.1:8080/micro/vue2