fix: assets precompile by using terser
importmaps broke precompiliation with uglifier see: https://github.com/rails/importmap-rails/issues/5
This commit is contained in:
parent
2b7cd33a37
commit
292e0d8137
3 changed files with 5 additions and 7 deletions
4
Gemfile
4
Gemfile
|
@ -7,7 +7,6 @@ gem 'mail', '~> 2.7.1' # bug with mail 2.8.0 https://github.com/mikel/mail/issue
|
||||||
|
|
||||||
gem 'sassc-rails'
|
gem 'sassc-rails'
|
||||||
gem 'less-rails'
|
gem 'less-rails'
|
||||||
gem 'uglifier'
|
|
||||||
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
|
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
|
||||||
gem 'therubyracer', platforms: :ruby
|
gem 'therubyracer', platforms: :ruby
|
||||||
|
|
||||||
|
@ -128,6 +127,5 @@ group :test do
|
||||||
end
|
end
|
||||||
|
|
||||||
gem "importmap-rails", "~> 1.1"
|
gem "importmap-rails", "~> 1.1"
|
||||||
|
|
||||||
gem "terser", "~> 1.1"
|
|
||||||
gem "image_processing", "~> 1.12"
|
gem "image_processing", "~> 1.12"
|
||||||
|
gem "terser", "~> 1.1"
|
||||||
|
|
|
@ -553,6 +553,8 @@ GEM
|
||||||
sqlite3 (>= 1.3.3)
|
sqlite3 (>= 1.3.3)
|
||||||
table_print (1.5.7)
|
table_print (1.5.7)
|
||||||
temple (0.9.1)
|
temple (0.9.1)
|
||||||
|
terser (1.1.13)
|
||||||
|
execjs (>= 0.3.0, < 3)
|
||||||
therubyracer (0.12.3)
|
therubyracer (0.12.3)
|
||||||
libv8 (~> 3.16.14.15)
|
libv8 (~> 3.16.14.15)
|
||||||
ref
|
ref
|
||||||
|
@ -573,8 +575,6 @@ GEM
|
||||||
unf (~> 0.1.0)
|
unf (~> 0.1.0)
|
||||||
tzinfo (2.0.5)
|
tzinfo (2.0.5)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
uglifier (4.2.0)
|
|
||||||
execjs (>= 0.3.0, < 3)
|
|
||||||
unf (0.1.4)
|
unf (0.1.4)
|
||||||
unf_ext
|
unf_ext
|
||||||
unf_ext (0.0.8.2)
|
unf_ext (0.0.8.2)
|
||||||
|
@ -690,9 +690,9 @@ DEPENDENCIES
|
||||||
sprockets (< 4)
|
sprockets (< 4)
|
||||||
sqlite3 (~> 1.3.6)
|
sqlite3 (~> 1.3.6)
|
||||||
table_print
|
table_print
|
||||||
|
terser (~> 1.1)
|
||||||
therubyracer
|
therubyracer
|
||||||
twitter-bootstrap-rails (~> 2.2.8)
|
twitter-bootstrap-rails (~> 2.2.8)
|
||||||
uglifier
|
|
||||||
web-console
|
web-console
|
||||||
whenever
|
whenever
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,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
|
||||||
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…
Reference in a new issue