rails / sass-rails

Ruby on Rails stylesheet engine for Sass
MIT License
859 stars 333 forks source link

Switch to embedded dart-sass? #445

Closed brian-kephart closed 1 year ago

brian-kephart commented 2 years ago

I've been having more and more segfaults with sassc, which is deprecated, and searches seem to turn up lots of other folks that have similar problems. It would be nice to have a good out-of-the-box sprockets integration for dart-sass instead. It seems like headway has been made on a version of dart-sass that doesn't depend on node and a Ruby wrapper for it.

This seems like a change worth making to me, but I realize this gem hasn't had a commit in years. Is anyone else interested in this?

Bozazitz commented 2 years ago

Interestd

brian-kephart commented 2 years ago

This happened literally a day after I opened this issue: https://github.com/rails/dartsass-rails 🤣

Still, that gem appears focused on css bundling rather than integration with Sprockets. My two use cases for the sass-rails gem are 1) engine dependencies, and 2) config.assets.css_compressor = :sass. It's easy enough to minify the assets I'm bundling myself, but the engine assets processed by Sprockets don't really have a good answer right now with the current state of SassC.

javierjulio commented 1 year ago

From the conversation in https://github.com/sass/sassc-ruby/pull/240 we now have https://github.com/tablecheck/dartsass-sprockets which acts more as a direct replacement to sassc-rails (note sass-rails is just a light wrapper around sassc-rails).

brian-kephart commented 1 year ago

Excellent news! That's just what I was hoping for when I opened this issue. Thanks for pointing it out. So far it seems to be working great, so I see no need to duplicate the work here.