Skip to content

Commit

Permalink
Fix JS compression error by running Ugilifier in harmony mode
Browse files Browse the repository at this point in the history
When building the docker image in production with script/docker/update
we get a new error:

```
```

We follow the instruction to use `Uglifier.new(:harmony => true)` and
sure enought the error is silenced.
  • Loading branch information
tahb committed Sep 23, 2022
1 parent 16fc5fc commit 041d2fb
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 @@ -27,7 +27,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)
# Set a css_compressor so sassc-rails does not overwrite the compressor when running the tests
config.assets.css_compressor = nil

Expand Down

0 comments on commit 041d2fb

Please sign in to comment.