我微信版本号,其他版本自己测试吧
![](https://img.haomeiwen.com/i8578148/061fb8f6ab093c5d.png)
如果不用useCompilerPlugins的话,可参考这方法,project.config.json开启useCompilerPlugins的话这就没用了。。。注意
"useCompilerPlugins": ["sass"]
1. 安装Live Sserver 和 Live Sass Compiler
可选择从vs安装后,再导入
![](https://img.haomeiwen.com/i8578148/67c0af2fd821500c.png)
不安装Live Sserver的话开发工具会有提示让安装的O(∩_∩)O~~
不想用vs code下载的点这里
提取码:wpfa
2.设置Sass编译方式,可选择不生成source map,没什么用
Ctrl+Shift+Alt+P 输入 setting,打开setting.json
![](https://img.haomeiwen.com/i8578148/dc9e3cc30b4335d2.png)
3.输入设置
![](https://img.haomeiwen.com/i8578148/1c13cf4dba161e3c.png)
"liveSassCompile.settings.formats": [
{
"format": "expanded",
"extensionName": ".wxss",
"savePath": null
}
],
"liveSassCompile.settings.generateMap": false
4.编辑器右下角点这个
(如果没有重启编辑器)
![](https://img.haomeiwen.com/i8578148/a407ed14cf95843d.png)
Watching状态后就可以用了。。。over
![](https://img.haomeiwen.com/i8578148/2f9578daaf4e2200.png)
网友评论