Before I set off down the rabbit hole to figure out how to do this myself, I’m here to ask if anyone’s done it before.
I’m using Sage with the handy Bulma CSS framework and I have a very nice — thank you devs! — local workflow with hot-reloading of CSS and JS.
I would like to improve one thing about it, which is the time taken to recompile my SCSS. My main.scss file
@imports some variables to configure bulma, the entire Bulma framework via
autoload/_bulma.scss, then all my various components, overrides etc.
99% of the time I am changing code in my components, not things which would require me to recompile the whole Bulma framework. However, it’s recompiled along with everything else each time I save an
.scss file. In an ideal world the hot-reloading would recompile my own code, but I could force a full recompile including Bulma if I restarted yarn.
I think one approach is to maintain two css bundles, one with the framework and one with all my own code. Does that sound reasonable? Has anyone tried this? Is there a better approach?