From d33cad4b7f47d28a18a82cb162ca1a0baad20673 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Mon, 27 Jan 2020 08:43:30 +0000 Subject: [PATCH 1/1] Re-enable minification of javascript assets Rails 6 defaults to --skip-javascript when creating new environments because by default it uses webpacker instead of sprockets to manage javascript and that meant that I accidentally merged a change that disabled the minification of javascript. Fixes #2522 --- config/environments/production.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/environments/production.rb b/config/environments/production.rb index 4016be615..407650d2d 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -22,7 +22,8 @@ Rails.application.configure do # Apache or NGINX already handles this. config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present? - # Compress CSS using a preprocessor. + # Compress JavaScripts and CSS. + config.assets.js_compressor = :uglifier # config.assets.css_compressor = :sass # Do not fallback to assets pipeline if a precompiled asset is missed. -- 2.39.5