Skip to content

Commit 3cdc92e

Browse files
committed
try terser
1 parent 62c626a commit 3cdc92e

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

Gemfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ gem 'pg'
99
gem 'puma', '~> 5.6.4'
1010
gem 'rails', '~> 6.1.1'
1111
gem 'sass-rails', '~> 5.0'
12-
gem 'uglifier', '>= 1.3.0'
12+
#gem 'uglifier', '>= 1.3.0'
13+
gem 'terser'
1314

1415
# gem 'therubyracer'
1516

Gemfile.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,8 @@ GEM
281281
actionpack (>= 5.2)
282282
activesupport (>= 5.2)
283283
sprockets (>= 3.0.0)
284+
terser (1.1.12)
285+
execjs (>= 0.3.0, < 3)
284286
thor (1.2.1)
285287
tilt (2.0.11)
286288
timeout (0.3.0)
@@ -289,8 +291,6 @@ GEM
289291
turbolinks-source (5.2.0)
290292
tzinfo (2.0.5)
291293
concurrent-ruby (~> 1.0)
292-
uglifier (4.2.0)
293-
execjs (>= 0.3.0, < 3)
294294
unicode-display_width (2.3.0)
295295
warden (1.2.9)
296296
rack (>= 2.0.9)
@@ -348,8 +348,8 @@ DEPENDENCIES
348348
sidekiq
349349
spring
350350
spring-watcher-listen (~> 2.0.0)
351+
terser
351352
turbolinks (~> 5)
352-
uglifier (>= 1.3.0)
353353
web-console (>= 3.3.0)
354354

355355
RUBY VERSION

config/environments/production.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@
2727
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
2828

2929
# Compress JavaScripts and CSS.
30-
config.assets.js_compressor = Uglifier.new(harmony: true)
30+
# config.assets.js_compressor = Uglifier.new(harmony: true)
31+
config.assets.js_compressor = :terser
32+
3133
# config.assets.css_compressor = :sass
3234

3335
# Do not fallback to assets pipeline if a precompiled asset is missed.

0 commit comments

Comments
 (0)