DEV Community

Kevsterdev
Kevsterdev

Posted on

How to use SASS/SCSS into VUE3

If you are new into SASS/SCSS, here you have a tutorial from freeCodeCamp to learn more about this.

Let's say we have a basic(or not) VUE3 project and we want to be able to write SASS or SCSS instead on CSS.

Open the terminal, I am using VSCode for this one, and first think is to install SASS by the following command:

npm install sass --save-dev

install sass

after that we need to install SASS loader by the following command:
npm install sass-loader --save-dev

install sass loader

now, in package.json, we should see both dependencies:

package.json

The last thing is to use lang="sass" into our styles tags, get rid of braces and semicolons and take advantage of the full power of SASS/SCSS

sass/scss

Top comments (0)