Conversation
|
While i'm fine with this in general I think it's worth at least briefly discussing what the plan for assets is before merging. Rails 8 ships importmaps by default but that's only really viable for those who don't care about backwards compatibility or compiling assets, which IMO isn't necessarily a great choice for a lot of applications. |
|
Definitely. I created this PR because I got annoyed with I assumed Uglifier was only compressing (not adding ES compat) and I was hoping everything would "just work" (but as I said I didn't even bother testing), do you have any particular concerns / things to test? I remember talking about importmaps for auto-updating jQuery, but I'm not sure why else we would need importmaps / non-trivial asset compilation. |
98ec043 to
53ef427
Compare
53ef427 to
00a3270
Compare
The config options `config.assets.{js,css}_compressor` replaced it in
Rails 4.0 [1].
[1] https://github.com/rails/rails/blob/v8.0.2/guides/source/upgrading_ruby_on_rails.md#sprockets-rails
Rails 8 has moved away from asset compression[1]. `uglifier` (JS compressor) requires a JavaScript runtime (which we previously provided using mini_racer). It's a large install and raises security concerns because it uses an outdated version of V8 (it's only meant to run as part of asset precompilation, not in the running web server; but still). `yui` requires the Java Runtime Environment. We follow the Rails 8 rationale and remove the asset compression (even though we are still on a much older version of Rails). [1] https://guides.rubyonrails.org/v8.0/asset_pipeline.html
00a3270 to
2d3f6d7
Compare
TO DO:
Stacked on #308 and #309.
From the commit message: