获得徽章 6
- 各位大佬有遇到过这个吗? 本地以及测试环境都没有问题,发布到线上就报错了,之前是可以的,今天发布的版本主要是添加动态路由,后端返回用户的可以访问的路由数据包含component的地址,
例如:component:'views/user/index.vue', 然后我这边循环后端返回的路由数据
item.component=routerCom(item.component);
function routerCom(path) {
return (resolve) => require([`@/${path}`], resolve);
}
得到一个新数组arr
router.addRoutes(arr);
Refused to apply style from '<URL>' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.展开赞过111
![[流泪]](http://lf-web-assets.juejin.cn/obj/juejin-web/xitu_juejin_web/img/jj_emoji_6.dde0d83.png)