You will need two things:

  • tasks.json file
  • Blade Runner extension for VS CODE

Start by creating .vscode folder in your project.

Then in it create tasks.json file with the following content:

{
    "version": "0.1.0",
    "command": "sass",
    "isShellCommand": true,
    "args": ["--watch", "."],
    "showOutput": "always"
}

Now, after opening the project you can run the task by clicking Ctrl+Shift+B.

To automate the process use Blade Runner extension - https://marketplace.visualstudio.com/items?itemName=yukidoi.blade-runner

Blade Runner will run the task automatically after opening the project :)

Answer from gabrieln on Stack Overflow
🌐
Visual Studio Code
code.visualstudio.com › docs › languages › css
CSS, SCSS and Less
November 3, 2021 - It then watches for changes to any SCSS/Less file at the root of our workspace, for example the current folder open in VS Code. It takes the set of SCSS/Less files that have changed and runs them through our respective compiler, for example gulp-sass, gulp-less. We now have a set of CSS files, each named respectively after their original SCSS/Less file.
🌐
Bangtech
data.bangtech.com › web › how-to-compile-your-sass-to-css-in-visual-studio-code.htm
How To Compile Your SASS/SCSS To CSS In Visual Studio Code
... Close Visual Studio and wait for the installer to appear. Follow the steps to install the extension. Create a file named style.scss in the wwwroot > css folder · Now right click on the newly created style.scss file and click on Web Compiler > Compile file.
🌐
Medium
medium.com › @codingcarter › how-to-compile-scss-code-in-visual-studio-code-c8406fe54a18
How to Compile SCSS Code in Visual Studio Code | by Coding Carter | Medium
January 24, 2020 - You can also click the “extensions” dialogue (Ctrl-Shift-X) in Visual Studio Code and search Live Sass Compiler and click on the one that is by Ritwick Dey. ... You must have your .scss file currently open (not exactly active) in the Explorer ...
Top answer
1 of 5
9

You will need two things:

  • tasks.json file
  • Blade Runner extension for VS CODE

Start by creating .vscode folder in your project.

Then in it create tasks.json file with the following content:

{
    "version": "0.1.0",
    "command": "sass",
    "isShellCommand": true,
    "args": ["--watch", "."],
    "showOutput": "always"
}

Now, after opening the project you can run the task by clicking Ctrl+Shift+B.

To automate the process use Blade Runner extension - https://marketplace.visualstudio.com/items?itemName=yukidoi.blade-runner

Blade Runner will run the task automatically after opening the project :)

2 of 5
4

A solution without additional extensions

With sass

Assuming you have sass installed globally with for instance:

npm install -g sass

Open the folder and create a task.json file under .vscode containing

{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
    {
        "label": "Watch Sass",
        "type": "shell",
        "command": "sass --watch src/style.sass styles/style.css --style=compressed",
        "problemMatcher": [],
        "group": {
            "kind": "build",
            "isDefault": true
        },
        "runOptions": {
            "runOn": "folderOpen"
        }
    }]
}

With node-sass

Replace sass with node-sass in the above.

In both cases make sure the source/destination filename, location and extension are correct (in my case src/style.scss and style/style.css)

With a Workspace file

Or copy the section in your .vscode-workspace file to avoid clutter of .json files.

Make sure to change the sass source and destination files to your personal needs.

Setup VSCode

[EDIT] whith the current version this is asked the first time you open the workspace file and the following steps are no longer needed. To a llow automatic run tasks

  1. Ctrl+Shift+P
  2. select Manage automatic Tasks and
  3. select Allow Automatic Tasks in Folder and
  4. close and reopen your folder (or Workspace)

The sass compiler will be called and starts watching all your edits with a reassuring:

Compiled css\src\style.sass to css\style.css.
Sass is watching for changes. Press Ctrl-C to stop.

or with error messages when compilation failed.:

Error: semicolons aren't allowed in the indented syntax.
  ╷
7 │     padding: 0;
  │               ^
  ╵
  css\src\_base.sass 7:12  @import
  css\src\style.sass 1:9   root stylesheet

EDIT command and args can be separated

{
    "label": "Compile sass",
    "type": "shell",
    "command": "sass",
    "args": [
        "--watch",
        "--style=compressed",
        "./style/src/main.sass",
        "./style/main.css"
    ],
    "runOptions": {
        "runOn": "folderOpen"
    }
},
🌐
Visual Studio Marketplace
marketplace.visualstudio.com › items
Live Sass Compiler - Visual Studio Marketplace
Extension for Visual Studio Code - Compile Sass or Scss to CSS at realtime.
🌐
YouTube
youtube.com › mr coder
How To Compile SASS To CSS In VSCode | The Easiest Way! - YouTube
Web browsers can't run SASS/SCSS files directly. So, it needs to be compiled into regular CSS. We usually do it by command prompt. But switching to the code ...
Published   November 28, 2020
Views   5K
🌐
YouTube
youtube.com › watch
How to use SCSS in VS Code - YouTube
Live Sass compiler is A VS Code Extension that helps you to compile/transpile your SASS/SCSS files to CSS files at realtime with live browser reloadinstagram...
Published   September 23, 2022
Find elsewhere
🌐
BlueWindLab
bluewindlab.net › setup-live-sass-compiler-for-visual-studio-code
Setup Live SASS Compiler For Visual Studio Code Editor
June 30, 2025 - We have developed several responsive web templates using the SASS compiler. Here are a few templates that were built using Sass. ... In the Visual Studio Code search box, search for open settings.
🌐
MDBootstrap
mdbootstrap.com › standard › material design for bootstrap 5 & vanilla javascript
Compiling SCSS to CSS in Visual Studio Code - Material Design for Bootstrap
Expected behavior I am trying to compile the mdb.scss file into a mdb.css file using Visual Studio Code and Live Sass Compiler extension.
🌐
YouTube
youtube.com › pixel rocket
Learn Sass - How To Compile Sass/SCSS Using VsCode Plugin - YouTube
Welcome to my Learn Sass series. I'll be doing single videos on the most important Sass topics, starting with today's video: the easiest way to compile your ...
Published   May 3, 2022
Views   1K
🌐
Visual Studio Marketplace
marketplace.visualstudio.com › items
Sass Compiler - Visual Studio Marketplace
Extension for Visual Studio - Transpiles Sass/Scss files to CSS and minifies it instantly - every time you save the file
🌐
Reddit
reddit.com › r/css › scss and auto compiling into css
r/css on Reddit: SCSS and auto compiling into CSS
February 6, 2023 -

I used to do a lot of front end work but have been out of the game for a while and am just starting to get back into it. Years ago I remember using Node.js to watch and compile my scss files into css. What's the preferred (easiest) method these days? I'm finding a lot of different solutions online at this point and it seems there's even extensions available for VSCode that basically handle it for you.

Also... one thing I seem to be completely drawing a blank on, what's the ideal process to set this up for multiple projects? Is it even possible to set it and forget it for multiple projects or by nature, will you always have to run some code or do some button pressing while you're working to get the compiler to watch for code changes? That's one piece I just can't remember how I did it before.

Top answer
1 of 5
2
You can do it with a node-based bundler like webpack or vite - those are still the leading way to do it today. Vite is preferred by many people today if you don't have any legacy reasons why you need webpack. My preference would probably be a docker setup for local development, but that does require a setup for every new project. I've never had any kind of setup that will compile files without running anything. Ultimately there will always need to be a process running to compile your files, it's just a matter of how it gets booted up or triggered. I haven't used them because docker is better for my setup, but I have also heard of vscode plugins that will auto-compile for you while you have vscode open - if that suits you, you should use it! The advantages of a docker setup and why I use it: configure once, run on any machine don't need to fuss with versions or configuration once you've set it up - a docker configuration is as close to 100% future-proof as you're going to get simplifies sharing your project across teams - other team members don't need to worry about their machine setup makes versions and configuration explicit so you always know exactly what this build was meant to run on Once you've been working on websites for a long time like I have, you start to appreciate projects where the setup to develop process is smooth and error-free, and you do not have to worry about your local setup in order to run an old site you coded some time ago. Dockerizing can usually provide that.
2 of 5
1
It sounds like you’re talking about using node to run sass to compile your css. You want to install npm & add sass as a dev dependency. Then add a script to your package.json to compile/watch your scss (e.g., sass src/styles.scss:public/styles.css --watch). I have a template folder and various boilerplate package.json files to get me started on new projects. You could install sass globally if you have a use case for that, too.
🌐
Reddit
reddit.com › r/web_design › how to automatically compile sass to css in visual studio code?
r/web_design on Reddit: How to automatically compile SASS to CSS in Visual Studio Code?
April 22, 2019 -

I recently tried the following extensions.

  • Live SASS Compiler - This one did work for SCSS but not for SASS. I went through the documentation but couldn't find anything. Also, in the GITHUB repo, there are so many bugs

  • Easy SASS - I couldn't make this work too.

Is there any alternative?

if there's not should I consider about sublime text or any other text editor?

Thank you very much.

🌐
Coding Campus
codingcampus.net › home › how to compile sass/scss to css in visual studio code
How to Compile SASS/SCSS to CSS in Visual Studio Code - Coding Campus
December 2, 2022 - For example, I am entering the following code: .card { position: relative; background-color: red; .card__name { background-color: blueviolet; } Click on the Watch Sass button from the Status bar at the bottom of VS Code.
🌐
Glenn Marks
glenn2223.github.io › vscode-live-sass-compiler
Home Page | Live Sass Compiler | VSCode Extension
A VSCode Extension that help you to compile/transpile your SASS/SCSS files to CSS at real-time.
🌐
Robkjohnson
robkjohnson.com › posts › how-to-set-up-sass-scss-compiling-in-vs-code
How to minify, complile and output your sass/scss to a specific file location by Rob Johnson
Install the VSCode Live Sass Compiler extension by selecting View + Extensions in the main menu and searching for Live Sass Compiler. Create a folder .vscode at the root of your project if it doesn't already exist ...
🌐
Coding Thai
codingthai.com › home › blog › how to compile scss code in visual studio code
How to Compile SCSS Code in Visual Studio Code - Coding Thai
February 13, 2023 - You can also click the “extensions” dialogue (Ctrl-Shift-X) in Visual Studio Code and search Live Sass Compiler and click on the one that is by Ritwick Dey. You must open the SCSS file in the Visual Studio code in the Explorer panel and ...
🌐
Andyp
andyp.dev › posts › compile-sass-files-in-visual-studio-2019-using-web-compiler
Compile Sass Files in Visual Studio 2019 Using Web Compiler | Andyp.dev
December 30, 2019 - Follow the steps to install the extension. NOTE that it can take a few seconds for the installer to appear. Wait for the installer to finish before re-opening Visual Studio. We now need to create a SASS (scss) file. Start by creating a file named style.scss in the wwwroot > css folder
🌐
GitHub
github.com › ritwickdey › vscode-live-sass-compiler
GitHub - ritwickdey/vscode-live-sass-compiler: Compile Sass or Scss file to CSS at realtime with live browser reload feature.
A VSCode Extension that help you to compile/transpile your SASS/SCSS files to CSS files at realtime with live browser reload.
Starred by 658 users
Forked by 173 users
Languages   TypeScript 63.1% | JavaScript 20.9% | HTML 11.3% | SCSS 4.7% | TypeScript 63.1% | JavaScript 20.9% | HTML 11.3% | SCSS 4.7%