irispixel/vscode-dartsass

Sass compiler plugin does not respond to changes in included (used) scss files

Closed this issue · 1 comments

If there is a main SCSS file main.scss, the resulting CSS file main.css is automatically generated upon saving it.
However, the plugin is not aware of changes in dependencies. If an included file (e.g., _foo.scss from @use 'foo') changes and is saved, nothing happens. The plugin should analyze these dependencies (which are easy to parse at compile time) and also check if files that the main file refers to change.

Steps to reproduce:

  1. Create a file main.scss and a file _foo.scss.
  2. Write @use 'foo' into main.scss at time t1.
  3. Modify _foo.scss at time t2. Check the timestamp of main.css: it is still t1 but should be t2. (The last modification in _foo.scss is not included in main.css yet, until main.scss is modified and the recompilation is finally triggered.)

See "watchers" for more details that does the same thing as you had requested.

It "watches" a particular directory and outputs the compiled css file to a directory of our choice ( or the same directory , if no output directory has been specified ).

The plugin merely delegates the functionality to the underlying sass executable as it does not do anything fancy like parsing the files etc. so the final output will be the same as that from the sass command line.

Hope that helps and works.