DEV Community

Tao Liu
Tao Liu

Posted on

Heroku Deploy Error: Uglifier::Error: Unexpected token: punc ({). To use ES6 syntax, harmony mode ...

ERROR: Uglifier::Error: Unexpected token: punc ({). To use ES6 syntax, harmony mode must be enabled with Uglifier.new(:harmony => true).

Try replacing

production.rb

config.assets.js_compressor = :uglifier

with

config.assets.js_compressor = Uglifier.new(harmony: true)

https://github.com/rails/webpacker/issues/1285

Top comments (0)