Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to compile Less/Sass files in Visual Studio 2017+

In VS <= 2015 we can use a WebEssentials extension that takes care for compiling the less/sass files for us, but currently it does not support VS 2017. Is there a similar extension that can compile Less/Sass on build?

like image 818
Mihail Shishkov Avatar asked Mar 10 '17 19:03

Mihail Shishkov


People also ask

What is the best way to compile sass?

Once you start tinkering with Sass, it will take your preprocessed Sass file and save it as a normal CSS file that you can use in your website. The most direct way to make this happen is in your terminal. Once Sass is installed, you can compile your Sass to CSS using the sass command.

How do I compile sass in Visual Studio 2019?

So you have to right-click each Bulma SASS file and select "Web Compiler" --> "Compile file". This will add it to the . json file and create/compile a . css file.


1 Answers

WebEssentials is being split up into multiple extensions. I believe the functionality you want is now in the Web Compiler extension.

If you want to do it without extensions, you could use a task runner like Gulp. See here for a walkthrough of how to integrate Gulp tasks into VS.

like image 90
Jimmy Avatar answered Oct 13 '22 08:10

Jimmy