报这种莫名其妙的错,不影响项目运行,但是极其不美观;

控制台报错如下:

Refused to apply style from 'http://localhost:8080/iconfont.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

原因是引入外部样式时候有import影响,删掉就行了,清除掉@import这行代码就行。

找了好久,找不到正确解决方式,记录一下。

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐