I have a bunch of seperated .scss partials and components, all imported to my main.scss file. Using npm's (ver. 9.2) sass (ver. 1.56) I can compile the entire project no problem with sass ./assets/scss/main.scss ./assets/css/style.css
command ran as an npm script.
The same command with the --watch
flag should keep track of changes in scss files and recompile accordingly. However despite displaying the right message:
> project@1.0.0 sass
> sass --watch ./assets/scss/main.scss ./assets/css/style.css
Sass is watching for changes. Press Ctrl-C to stop.
the compiler doesn't notice any changes done to the scss files, and that includes the target main.scss.
I use WebStorm IDE on Windows 10 with the WSL 2 Ubuntu 22.04.1 for Node and npm. It seems this issue is unique to my setup as my collaborators in this project have sass --watch
working just fine.
What could I do to trace the source of the issue?
Issues with SASS watch pop up a lot with a bit of googling but they mostly seem to be related to the (now deprecated) ruby implementation of SASS and the proposed fixes are as well, e.g.:
sass --watch not updating after initial launch (sass 3.1.16)
which is why I decided to ask yet another question about his issue, hopefully the different circumstances provide this post with enough utility to not be closed on sight.