Home > Blockchain >  Live sass compiler not loading modules
Live sass compiler not loading modules

Time:04-13

I'm trying to load a member in my main style file.

Here is the file structure

File structure

Here is the code from _body_style.scss

body{
    margin: 0px;
}

Then code code from main_style.scss

@use '_body_style';

And this is the output in main_style.css

@use '_body_style';
/*# sourceMappingURL=main_style.css.map */

The compiler is not loading the module and I don't see any errors in console

Console output

Is there any configuration I'm missing or am I doing it wrong? I used this before for a different project and I don't remember having such problem.

CodePudding user response:

Use Live Sass Compiler by Glenn Marks


Well, the problem is caused by the Visual Studio Code extension you are using for compiling SASS or SCSS files to CSS files.

Don't use this extension: Live Sass Compiler by Ritwick Dey

You are probably using this extension: Live Sass Compiler by Ritwick Dey. It's widely used, but is no longer supported by the author. Consequently, the SASS version isn't updated. This extension produces the error you are describing.

Use this extension: Live Sass Compiler by Glenn Marks

You should use this extension: Live Sass Compiler by Glenn Marks. As the author states: A big thank you to @ritwickdey for all his work. However, as they are no longer maintaining the original work, I have released my own which has been built upon it. This extension compiles your SASS or SCSS files to CSS files successfully.

  • Related