diff --git a/config/environments/production.rb b/config/environments/production.rb index 2e08f8e029..a780f486fb 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -45,6 +45,7 @@ Openfoodnetwork::Application.configure do # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added) # config.assets.precompile += %w( search.js ) + require 'uglifier' config.assets.js_compressor = Uglifier.new(mangle: false) # Disable delivery errors, bad email addresses will be ignored diff --git a/config/environments/staging.rb b/config/environments/staging.rb index bee008922f..ee6fa16e8a 100644 --- a/config/environments/staging.rb +++ b/config/environments/staging.rb @@ -45,6 +45,7 @@ Openfoodnetwork::Application.configure do # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added) # config.assets.precompile += %w( search.js ) + require 'uglifier' config.assets.js_compressor = Uglifier.new(mangle: false) # Disable delivery errors, bad email addresses will be ignored