各位大佬有遇到过这个吗? 本地以及测试环境都没有问题,发布到线上就报错了,之前是可以的,今天发布的版本主要是添加动态路由,后端返回用户的可以访问的路由数据包含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.
展开
11