Use terser for javascript compression to get ES6 support
This commit is contained in:
parent
fa8818337f
commit
2c1a3d5940
3 changed files with 6 additions and 6 deletions
4
Gemfile
4
Gemfile
|
@ -12,8 +12,8 @@ gem "pg"
|
||||||
# Use SCSS for stylesheets
|
# Use SCSS for stylesheets
|
||||||
gem "sassc-rails"
|
gem "sassc-rails"
|
||||||
|
|
||||||
# Use Uglifier as compressor for JavaScript assets
|
# Use Terser as compressor for JavaScript assets
|
||||||
gem "uglifier", ">= 1.3.0"
|
gem "terser"
|
||||||
|
|
||||||
# Use jquery as the JavaScript library
|
# Use jquery as the JavaScript library
|
||||||
gem "jquery-rails"
|
gem "jquery-rails"
|
||||||
|
|
|
@ -468,12 +468,12 @@ GEM
|
||||||
sprockets (>= 3.0.0)
|
sprockets (>= 3.0.0)
|
||||||
strong_migrations (0.7.7)
|
strong_migrations (0.7.7)
|
||||||
activerecord (>= 5)
|
activerecord (>= 5)
|
||||||
|
terser (1.1.5)
|
||||||
|
execjs (>= 0.3.0, < 3)
|
||||||
thor (1.1.0)
|
thor (1.1.0)
|
||||||
tilt (2.0.10)
|
tilt (2.0.10)
|
||||||
tzinfo (2.0.4)
|
tzinfo (2.0.4)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
uglifier (4.2.0)
|
|
||||||
execjs (>= 0.3.0, < 3)
|
|
||||||
unicode-display_width (2.0.0)
|
unicode-display_width (2.0.0)
|
||||||
validates_email_format_of (1.6.3)
|
validates_email_format_of (1.6.3)
|
||||||
i18n
|
i18n
|
||||||
|
@ -572,7 +572,7 @@ DEPENDENCIES
|
||||||
simplecov
|
simplecov
|
||||||
simplecov-lcov
|
simplecov-lcov
|
||||||
strong_migrations
|
strong_migrations
|
||||||
uglifier (>= 1.3.0)
|
terser
|
||||||
validates_email_format_of (>= 1.5.1)
|
validates_email_format_of (>= 1.5.1)
|
||||||
vendorer
|
vendorer
|
||||||
webmock
|
webmock
|
||||||
|
|
|
@ -25,7 +25,7 @@ Rails.application.configure do
|
||||||
config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present?
|
config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present?
|
||||||
|
|
||||||
# Compress JavaScripts and CSS.
|
# Compress JavaScripts and CSS.
|
||||||
config.assets.js_compressor = :uglifier
|
config.assets.js_compressor = Terser.new
|
||||||
# config.assets.css_compressor = :sass
|
# config.assets.css_compressor = :sass
|
||||||
|
|
||||||
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue