easy-team / egg-react-webpack-boilerplate

Egg React Server Side Render(SSR) / Client Sider Render(CSR)
https://easyjs.cn/egg-react
MIT License
671 stars 93 forks source link

提取公共css后,报 stylesheet MIME type 错误 #53

Closed poyiding closed 4 years ago

poyiding commented 4 years ago

按照 https://www.yuque.com/easy-team/egg-react/static 提取公共css,然后在view的html文件中<link href="/public/asset/css/global.css" rel="stylesheet" type="text/css" />引入,提示报错。

Refused to apply style from '“http://192.168.5.116:7001/public/asset/css/normalize.css'” because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

是css @import './xxx.css' 导致,目前去掉css 中 @import 语法就正常