Compress JS and CSS files for production
This commit is contained in:
1
Gemfile
1
Gemfile
@ -48,6 +48,7 @@ gem 'slim-rails'
|
|||||||
gem 'sorcery' # Causes a deprecation warning in Rails 6.0+, see: https://github.com/Sorcery/sorcery/pull/255
|
gem 'sorcery' # Causes a deprecation warning in Rails 6.0+, see: https://github.com/Sorcery/sorcery/pull/255
|
||||||
gem 'sprockets-rails'
|
gem 'sprockets-rails'
|
||||||
gem 'telegraf'
|
gem 'telegraf'
|
||||||
|
gem 'terser'
|
||||||
gem 'tubesock'
|
gem 'tubesock'
|
||||||
gem 'turbolinks'
|
gem 'turbolinks'
|
||||||
gem 'whenever', require: false
|
gem 'whenever', require: false
|
||||||
|
@ -151,6 +151,7 @@ GEM
|
|||||||
erubi (1.11.0)
|
erubi (1.11.0)
|
||||||
eventmachine (1.2.7)
|
eventmachine (1.2.7)
|
||||||
excon (0.94.0)
|
excon (0.94.0)
|
||||||
|
execjs (2.8.1)
|
||||||
factory_bot (6.2.1)
|
factory_bot (6.2.1)
|
||||||
activesupport (>= 5.0.0)
|
activesupport (>= 5.0.0)
|
||||||
factory_bot_rails (6.2.0)
|
factory_bot_rails (6.2.0)
|
||||||
@ -488,6 +489,8 @@ GEM
|
|||||||
telegraf (2.1.1)
|
telegraf (2.1.1)
|
||||||
influxdb
|
influxdb
|
||||||
temple (0.8.2)
|
temple (0.8.2)
|
||||||
|
terser (1.1.12)
|
||||||
|
execjs (>= 0.3.0, < 3)
|
||||||
thor (1.2.1)
|
thor (1.2.1)
|
||||||
tilt (2.0.11)
|
tilt (2.0.11)
|
||||||
timeout (0.3.0)
|
timeout (0.3.0)
|
||||||
@ -609,6 +612,7 @@ DEPENDENCIES
|
|||||||
sorcery
|
sorcery
|
||||||
sprockets-rails
|
sprockets-rails
|
||||||
telegraf
|
telegraf
|
||||||
|
terser
|
||||||
tubesock
|
tubesock
|
||||||
turbolinks
|
turbolinks
|
||||||
web-console
|
web-console
|
||||||
|
@ -28,7 +28,10 @@ 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 CSS using a preprocessor.
|
# Compress CSS using a preprocessor.
|
||||||
# config.assets.css_compressor = :sass
|
config.assets.css_compressor = :sass
|
||||||
|
|
||||||
|
# Compress JavaScript using a preprocessor.
|
||||||
|
config.assets.js_compressor = :terser
|
||||||
|
|
||||||
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
||||||
config.assets.compile = false
|
config.assets.compile = false
|
||||||
|
Reference in New Issue
Block a user