ES6 syntax, harmony mode must be enabled with Uglifier.new(:harmony => true : <p>I am facing this problem </p>

<p><code>Uglifier::Error: Unexpected token: keyword (const). To use ES6 syntax, harmony mode must be enabled with Uglifier.new(:harmony =&gt; true).
</code>
while deploying the project through capistrano on production.</p>

<p>I followed this solution </p>

<p><a href="https://github.com/lautis/uglifier/issues/127#issuecomment-352224986" rel="noreferrer">https://github.com/lautis/uglifier/issues/127#issuecomment-352224986</a></p>

<p>which suggests</p>

<p>replacing</p>

<p><code>config.assets.js_compressor = :uglifier</code></p>

<p>with</p>

<p><code>config.assets.js_compressor = Uglifier.new(harmony: true)</code></p>

<p>but even after doing that I am still facing the same error. I dont understand what went wrong. I am using <code>uglifier (4.1.20)</code> version</p>
