美文网首页
vue启动服务Cannot GET /问题

vue启动服务Cannot GET /问题

作者: 菜菜___ | 来源:发表于2021-09-01 10:26 被阅读0次

在启动vue项目时,出现Cannot GET /提示,原因是之前修改了config下index.js的assetsPublicPath

错误提示:
Refused to load the image 'http://localhost:8075/favicon.ico' because it violates the following Content Security Policy directive: "default-src 'none'". Note that 'img-src' was not explicitly set, so 'default-src' is used as a fallback.


解决方法:
将config下index.js中的 assetsPublicPath: './'改成`assetsPublicPath: '/'即可。
正常启动

相关文章

网友评论

      本文标题:vue启动服务Cannot GET /问题

      本文链接:https://www.haomeiwen.com/subject/lsawxktx.html