How To Add SASS/SCSS Support to Vue Components

26 Jul · by Tim Kamanin · 1 min read

If you want to add SASS/SCSS support to your Vue app, it has never been easier before!

You can do this in two steps:

1) Install sass and sass-loader. Run the following command in your project dir:

npm install --save-dev node-sass sass-loader

2) Add lang="scss" attribute to style tag of your vue component:

<style lang="scss">
.parent {
    .look-ma-i-m-doing-sass {
       color: red;
    }
}
</style>

That's all. You're good to go!

Want to get more 🔥 tips like this one?

Subscribe to get notified about new dev tutorials

Comments