Migrate from sass-rails to dartsass-rails
mainFollow these steps to switch from sass-rails (or sassc-rails) to dartsass-rails:
- Remove the old gem:
./bin/bundle remove sass-rails - Install
dartsass-railsusing the installation guide. - Clean up Sprockets: Remove any references to Sass files from
app/assets/config/manifest.js. Dart Sass handles these files now, and Sprockets attempting to build them will cause errors. - CI/CD Update: Ensure your continuous integration pipeline runs the build command before running browser-based tests:
bundle exec rails dartsass:build
./bin/bundle remove sass-rails
./bin/rails dartsass:install
# Remove Sass references from app/assets/config/manifest.js
bundle exec rails dartsass:build