vue启动服务Cannot GET /问题

在启动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: '/'即可。

正常启动
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容