SCSS File Watcher not Triggering or not working

 I am using PyCharm and compiling CSS using Filewatcher. IDK what to do CSS is sharing with SCSS file but not compiling and Not reflecting change in Browser.

6 comments
Comment actions Permalink

Do you mean that the watcher is not triggered when you change your .scss file?

Can you check if enabling 'Trigger watcher regardless of syntax errors' option makes any difference? if not, please try invalidating caches (File/Invalidate caches, Invalidate and restart)
Note also that with 'Track only root files' option enabled the resultant .css is only created for 'main' file - no separate .css files for partials are generated

2
Comment actions Permalink

I have the same issue. I want to run Prettier on each scss file, partial or not.

My watcher is set to project files, track only root files is off, trigger regardless of syntax errors is on.

When I change a partial file, Prettier is run on the main file ...

I guess there is a need for a setting that allows a file watcher to run on the root file or on the changed file.

0
Comment actions Permalink

SCSS files with names prefixed with underscore are treated in a special way - they are considered partials and aren't prettified, the main .scss that includes them is processed instead. To avoid this, try adding COMPILE_PARTIAL=true variable to your file watcher settings:

Also, make sure that Track only root files is off.

See the comments in https://youtrack.jetbrains.com/issue/WEB-13459 for explanation.

0
Comment actions Permalink

Thank you for your response, adding COMPILE_PARTIAL=true worked! I still wonder how I could have solved this on my own, it does not seem to be documented. Is COMPILE_PARTIAL something that is interpreted by IDEA/WebStorm/PhpStorm? If so, I think this should be a checkbox in the interface.

1
Comment actions Permalink

>Is COMPILE_PARTIAL something that is interpreted by IDEA/WebStorm/PhpStorm?

Yes

0
Comment actions Permalink

Thank you. Then I would like to reaffirm my feature request to make it a checkbox. Anyway, thanks a lot for your help!

1

Please sign in to leave a comment.