Search code examples
intellij-ideasassfile-watcher

IntelliJ SASS file watcher doesn't detect changes in SCSS file


I have a style.sass file that @uses several _*.sass partials. That was all working fine. Now I added a _*.scss file (it just contains a map, so I wanted it to be multiline), but editing that file does not trigger a rebuild of the style.sass file. I tried adding a SCSS file watcher too, since I'm not sure how IntelliJ decides what to watch, but that didn't help.

It works fine using Dart-SASS's --watch argument. How do I make IntelliJ do the same?

(Although it's a Play project, I'm using IntelliJ's file watchers because I wanted to be able to use @use, so I needed Dart SASS.)


Solution

  • The watcher can only listen to changes in files of same type (either SASS or SCSS), depending on the watcher settings, so you can't make the watcher work for both .scss and .sass files at the same time unless you use a custom scope with both .sass and .scss files included and set File Type: to Any:

    enter image description here