0
点赞
收藏
分享

微信扫一扫

warning “@charset“ must be the first rule in the file

窗外路过了谁 2022-03-11 阅读 121

在开发vue3项目,使用vite2打包时,css文件报出黄色警告

原因:css编译,@charset 规则放在第一位, 具体的原因与font-family有关

解决:因为我只有2个css文件受影响,直接去除@charset就可以了。

/*@charset “UTF-8”;*/

此警告不影响打包

[vite2打包出现警告,"@charset" must be the first,该如何消除呢? - 知乎](https://www.zhihu.com/question/498190531 “vite2打包出现警告,”@charset" must be the first,该如何消除呢? - 知乎")

举报

相关推荐

warning LF will be replaced by CRLF in file

0 条评论