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

网友评论