Skip to content

Commit

Permalink
Use Uglifier with harmony in order to allow ES6 syntax. (wyeworks#2227)
Browse files Browse the repository at this point in the history
# Release Notes

Tech task: Allow ES6 syntax in JS.

# Additional Context

This error came up on open stage: `Uglifier::Error: Unexpected token: keyword (const). To use ES6 syntax, harmony mode must be enabled with Uglifier.new(:harmony => true)`
  • Loading branch information
jhanggi authored and chrixp committed Oct 21, 2020
1 parent 74de39a commit 72125af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present?

# Compress JavaScripts and CSS.
config.assets.js_compressor = :uglifier
config.assets.js_compressor = = Uglifier.new(harmony: true)
# config.assets.css_compressor = :sass

# Do not fallback to assets pipeline if a precompiled asset is missed.
Expand Down

0 comments on commit 72125af

Please sign in to comment.