I'm using Koala for Win64 to compile sass (with lot of partials) to css with no problems, but Koala auto compile function is only runs when there are updates in root scss file, so I need to open Koala and press 'compile' button every time when I made changes to included partials.
Is there any way to configure scss auto compile to watch for changes in sass partials?
So came across this as I was having problems myself. Just documenting...
was to create a style.scss
or global.scss
(making sure to setup "Auto Compile" in Koala) and only fill it with imports:
@import 'layout'; //_layout.scss
@import 'layout_modules'; // _layout_modules.scss
@import 'modules'; // _modules.scss
@import 'theme'; // _theme.scss
When I would work on the partials (partials will have a _
in front of the filename) and save I would get an autocompile confirmation (Koala Settings > General > "Notification when compile is completed")
But _layout_modules.scss
would not trigger autocompile on save. If I switched over to another partial and saved, it would autocompile and Koala would still throw helpful errors for _layout_modules.scss
.
then, was to remove the extra underscore in the filename - so it would just be _layoutmodules.scss
(make sure to update your @import
on style.scss
) and worked as expected.
(I've been using Sass for all of 5 days.)
Short answer:
add _
before partial files and import them to the main file.
Thanks to @philtune
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With