Sass编译时Invalid US-ASCII character解决办法

时间:2021-02-26 16:01:52

编译scss文件时,如果出现如下错误

Error: Invalid US-ASCII character "\xC2"
on line 63 of src/assets/_scss/partials/_post-list.scss
from line 36 of src/assets/_scss/style.scss
Use --trace for backtrace.

解决办法就是在报错的scss文件顶部加上编码类型即可:

@charset "UTF-8";

引自:这里