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:
- Create a file
main.scss
and a file_foo.scss
. - Write
@use 'foo'
into main.scss at timet1
. - Modify
_foo.scss
at timet2
. Check the timestamp ofmain.css
: it is stillt1
but should bet2
. (The last modification in_foo.scss
is not included inmain.css
yet, untilmain.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.