Skip to content

Commit

Permalink
Specify uglifier as symbol instead
Browse files Browse the repository at this point in the history
Failed to deploy on production with:

Uglifier::Error:
../gems/uglifier-4.2.0/lib/uglifier.rb:291:in `parse_result'

See lautis/uglifier/issues/185
  • Loading branch information
manno committed Dec 25, 2023
1 parent d352efa commit ba0c433
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config/deploy.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# config valid only for current version of Capistrano
lock '3.17.0'
lock '3.17.1'

set :application, 'media-site'
set :repo_url, ENV['CAP_REPO']
Expand Down
5 changes: 4 additions & 1 deletion config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?

# Compress JavaScripts and CSS.
config.assets.js_compressor = Uglifier.new(harmony: true, compress: { keep_fnames: true }) if defined? Uglifier
config.assets.configure do |env|
env.js_compressor = :uglifier # or :closure, :yui
env.css_compressor = :sass # or :yui
end

# Compress CSS using a preprocessor.
# config.assets.css_compressor = :sass
Expand Down

0 comments on commit ba0c433

Please sign in to comment.