ai / autoprefixer-rails

Autoprefixer for Ruby and Ruby on Rails
https://twitter.com/autoprefixer
MIT License
1.22k stars 109 forks source link

Ensure sprockets-rails is loaded before autoprefixer-rails #216

Closed zarqman closed 2 years ago

zarqman commented 3 years ago

Rails 7 no longer depends on sprockets-rails and thus no longer loads it early in the Rails boot process. The sprockets railtie must be loaded before the autoprefixer railtie otherwise autoprefixer fails to activate properly.

The problem only shows up when the Gemfile loads autoprefixer-rails before sprockets-rails. With this PR, it works either way.

Fixes #215

albb0920 commented 2 years ago

Is there any reason we want to ignore the LoadError? BTW, very sorry for the late response, I missed the email notification.

zarqman commented 2 years ago

I think I added that because autoprefixer-rails doesn't formally depend on sprockets-rails and therefore shouldn't error if sprockets-rails isn't installed.

albb0920 commented 2 years ago

Thanks, merged and will be included in the next release.

dylanfisher commented 2 years ago

Would be great to release this soon now that Rails 7 is out in the wild. Thanks for your efforts!

albb0920 commented 2 years ago

Sorry for the delay, it's now included in 10.4.2.0, thanks!