rails/sprockets-rails

resolve_assets_in_css_urls option ignored in config/initializers (in a Rails 6.0 project)

slondr opened this issue · 0 comments

I'm in the process of updating a Rails 5.2 application to Rails 6.0, which necessitates updating from sprockets-rails 3.2.2 to sprockets-rails 3.4.2; sadly this upgrade breaks my application, as it overwrites the urls in @import statements in CS to absolute urls which do not mirror the relative urls they are overwriting. A config option was introduced to undo this behavior, but, I am assuming due to the same circumstances discussed in #36 and #63 and rails/rails#10428, this setting is ignored when set in config/initializers/assets.rb. Moving the setting to application.rb fixes the bug, but it sticks out like a sore thumb in that file.