Configuration steps for WeChat applet to use scss to compile wxss files


The WeChat applet developer tool integrates the vscode editor and can use many plug-ins in vscode, which provides great convenience for us to develop WeChat applet.
You can use the easysass plug-in to use sass in WeChat development. The installation steps are as follows.

1. Search for the easysass plug-in in vscode and install it

Insert image description here

2. Import and install the easysass plug-in in the WeChat development tool

Insert image description here

3. Modify the configuration in the spook.easysass-0.0.6/package.json file

Insert image description here
Find this file and open it.
Insert image description here
Open the package.json inside and modify the content. Insert image description here
Click here to modify it.
Insert image description here

4. Restart the developer tools and you will be able to use them.

Restart the project.
In the WeChat development tools: Project -> Reopen this project
and create
a new .scss file. Write the css style normally here. After saving, it will be compiled into a .wxss file.
Insert image description here

Guess you like

Origin blog.csdn.net/wang13679201813/article/details/129280623