vue启动服务Cannot GET /问题

2021-09-01  本文已影响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: '/'即可。
正常启动
上一篇 下一篇

猜你喜欢

热点阅读