You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue i'm having is that for the last month or so, my CSS is not getting re-compiled when I alter certain imported scss files. (I don't have any imported .css files — the issue reported in #24 that has a workaround.)
Here is the order of compilation: the app has different themes like theme_one.css that are loaded in the head according to user preferences, instead of an application.css. The scss structure is:
// app/assets/stylesheets/theme_one.scss// import this theme's variables@import"custom/theme_one_vars"// import the whole application
@import"application"
// app/assets/stylesheets/application.scss@import"bootstrap-sprockets";
@import"custom/map_theme_vars_to_bootstrap_vars";
@import"bootstrap";
// Now that bootstrap defaults are themed, set custom SCSS for our elements.@import"custom/elements";
// etc
The changes i want to make are in custom/elements.scss. But if I only change custom/elements.scss, CSS does not get recompiled. However, if I make my changes to custom/elements.scss and also, experimentally, alter a variable in custom/theme_one_vars.scss - in this case, all of the SCSS is recompiled, reflecting the changes in custom/elements.scss.
It occurred to me that this may be related to scss deprecation warnings. The app still uses Bootstrap 3, but our upgrade migration is a couple months away. Considering the order of imports, this indicates to me that maybe dartsass-sprockets, sprockets or dartsass stops checking for altered files after finding a deprecation warning. But that doesn't quite make sense — in the case where the CSS does get compiled, the compilation proceeds even after the warnings.
(To anticipate a possible question, yes I have run assets:clobber to be sure I don't have precompiled assets!)
The text was updated successfully, but these errors were encountered:
nimmolo
changed the title
dartsass-sprockets not noticing changes in secondary @import .scss filesdartsass-sprockets not noticing changes in secondary @import .scss files, with deprecation warnings
Jun 28, 2024
The issue i'm having is that for the last month or so, my CSS is not getting re-compiled when I alter certain imported scss files. (I don't have any imported .css files — the issue reported in #24 that has a workaround.)
Here is the order of compilation: the app has different themes like
theme_one.css
that are loaded in the head according to user preferences, instead of anapplication.css
. The scss structure is:The changes i want to make are in
custom/elements.scss
. But if I only changecustom/elements.scss
, CSS does not get recompiled. However, if I make my changes tocustom/elements.scss
and also, experimentally, alter a variable incustom/theme_one_vars.scss
- in this case, all of the SCSS is recompiled, reflecting the changes incustom/elements.scss
.It occurred to me that this may be related to scss deprecation warnings. The app still uses Bootstrap 3, but our upgrade migration is a couple months away. Considering the order of imports, this indicates to me that maybe
dartsass-sprockets
,sprockets
ordartsass
stops checking for altered files after finding a deprecation warning. But that doesn't quite make sense — in the case where the CSS does get compiled, the compilation proceeds even after the warnings.(To anticipate a possible question, yes I have run
assets:clobber
to be sure I don't have precompiled assets!)The text was updated successfully, but these errors were encountered: