Compiling ES6 syntax with Uglifier on
02 Jan 06:57

When you try to compile ES6 syntax with Uglifier gem initialized you get this error:

Uglifier::Error: (...) To use ES6 syntax, harmony mode must be enabled with => true)

To fix this just change

config.assets.js_compressor = :uglifier


config.assets.js_compressor = true)

in config/environments/production.rb or whatever environment you’re using on production.


Empty! You must sign in to add comments.