rails / sass-rails

Ruby on Rails stylesheet engine for Sass

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Switch to embedded dart-sass?

brian-kephart opened this issue · comments

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?

Interestd

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.

From the conversation in sass/sassc-ruby#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).

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.