Live Sass Compiler

Hello there,

I am trying to use the live sass compiler in my vscode but it’s not working.

I have installed the live sass compiler by ritwick dey but I guess the problem is in the settings.json file. Please see the code I have in there below.

{
“files.autoSave”: “afterDelay”,
“liveSassCompile.settings.excludeList”: [

    "**/node_modules/**",
    ".vscode/**"
],
"liveSassCompile.settings.autoprefix": [],

"liveSassCompile.settings.formats": [
        {
        "format": "expanded",
        "extensionName": ".css",
        "savePath": "/css"
    }
]

}

anyone with a possible solution ?

Hey Ejovi! :slight_smile: How are you doing?

Is this your settings.json or your defaultSettings.json for VSCode?

I have currently not set any custom settings for Dey’s sass extension and the extension just works out of the box.

I’ll share with you what are mines (in defaultSettings.json):

	// Automatically add vendor prefixes to unsupported CSS properties (e. g. transform -> -ms-transform). Specify what browsers to target with an array of strings (uses [Browserslist](https://github.com/ai/browserslist)). Pass `null` to turn off. 
	// Default is `null`
	"liveSassCompile.settings.autoprefix": [
		"> 1%",
		"last 2 versions"
	],

	// All Sass/Scss files inside the folders will be excluded. 
	// 
	// Examples: 
	// '**/node_modules/**',
	// '.vscode/**', 
	// '.history/**' 
	// 
	// Glob Patterns are accepted.
	"liveSassCompile.settings.excludeList": [
		"**/node_modules/**",
		".vscode/**"
	],

	// Set your exported CSS Styles, Formats & save location.
	"liveSassCompile.settings.formats": [
		{
			"format": "expanded",
			"extensionName": ".css",
			"savePath": null
		}
	],

Try first to check what you got in your defaultSettings.json, then if they differ from these, try maybe to copypaste these in your settings.json and see what happens.

Also, are you using your settings to modify your user or your workspace?

Cheers,

I tried to use the code you pasted above and it didn’t compile still.

I’ll use the node sass npm.

Thanks.

You’re welcome! I’m happy that you found a solution anyway :slight_smile: