Open nimmolo opened 6 months ago
Try dartsass-sprockets instead. I use that quite successfully as it uses sass-embedded under the hood.
Thanks @mhenrixon - dartsass-sprockets
is what we're using now. Are you able to get it to compile changes to your SASS?
Unfortunately for us, dartsass-sprockets
has started ignoring dev changes in any SASS files that are included by @import
. It does not compile the changes unless we force it by changing some variable in top level SASS files. I don't know if our issue is with sass-embedded, dartsass-sprockets... or if it's expected behavior, because the older version of Bootstrap included with this gem now throws SASS deprecation warnings.
That's why we were looking to try dartsass-rails
. In any case I believe that we'll update to BS 4 and 5 pretty soon, and then we'll switch to the appropriate gem for those versions, or maybe include the SCSS manually. But in the meantime it's making front end changes much more complicated.
That's why we were looking to try
dartsass-rails
. In any case I believe that we'll update to BS 4 and 5 pretty soon, and then we'll switch to the appropriate gem for those versions, or maybe include the SCSS manually. But in the meantime it's making front end changes much more complicated.
@nimmolo, I have already upgraded one project to BS 5.3, but the other project is a beast of 300,000 LoC and has 60% test coverage.
esbuild/node-sass still have issues with picking up on changes that I haven't experienced with, say, tailwindcss, vite, and bun.
@mhenrixon Good to know about node-sass not picking up changes either. Something tells me the deprecation warnings from BS 3 are stoping compilation and i just have to knuckle down and upgrade.
I agree with you about how daunting that can be. My main project is a 271K LoC beastie that i've been trying to get to BS4 for years, but keep realizing there are deeper things to fix!
Switching our Rails 7 app from
sassc
todartsass-sprockets
works withbootstrap-rails
.But if we try to switch to
dartsass-rails
,assets:precompile
fails.If we keep gem
sprockets-rails
andsprockets:railtie
:or if we don't load sprockets, of course there's no task
assets:precompile
:I've tried debugging this according to this issue on dartsass-rails, but even with the file
app/assets/builds/.keep
in place,assets:precompile
is not a defined task.Reading through the code of this gem, it seems that
sprockets-rails
is not a dependency. Is there anyone who has gotten this to work with dartsass-rails?