需先安装node-sass
设置=》工具=》file watchers
具体参数:
program(主程序,如果node-sass在全局可用,直接写node-sass。如果不是全局可用,请写全路径。): C:\Users\15541\AppData\Roaming\npm\node-sass.cmd
Arguments(参数,注意不要写-w --watch 因为file watchers已经进行监听,node-sass再进行监听会进入死循环。): $FileName$ $FileNameWithoutExtension$.css
Output paths to refresh(输出后刷新文件):$FileDir$
Working directory:$FileDir$
注意:编译成功后,输出格式为:
引用时,直接引用即可:
<link rel="stylesheet" href="./head.css">
head.css与head.scss同级!!!