项目重新打开之后,发现无法运行,报错信息如下:
Refused to load the image 'http://localhost:8080/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的路径为'/',把原来的.去掉了。再重新启动项目就可以了