At FastRuby.io, in some Ruby on Rails applications we have worked on, we found that the JavaScript had moved to a bundler but Sprockets still compiled the CSS through sass-rails. In a previous article , I covered the JavaScript half of that move, and this one covers the CSS half.
Recently we replaced Sprockets with Propshaft and cssbundling-rails in a customer’s application. Propshaft mostly fingerprints and serves files, so the Sass CLI has to compile the CSS before Rails ever sees it. The application used Bootstrap 4, vendored locally along with a few plugins, so that is the stylesheet we had to move.
In this article, you will learn how to replace Sprockets with Propshaft, convert a Sprockets CSS manifest into a Sass entry point built by cssbundling-rails, and fix what breaks once Sprockets is no longer compiling your assets for you.
Read more of Moving Rails CSS From Sprockets to Propshaft