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 'sprockets-rails'
|
||||
gem 'telegraf'
|
||||
gem 'terser'
|
||||
gem 'tubesock'
|
||||
gem 'turbolinks'
|
||||
gem 'whenever', require: false
|
||||
|
@ -151,6 +151,7 @@ GEM
|
||||
erubi (1.11.0)
|
||||
eventmachine (1.2.7)
|
||||
excon (0.94.0)
|
||||
execjs (2.8.1)
|
||||
factory_bot (6.2.1)
|
||||
activesupport (>= 5.0.0)
|
||||
factory_bot_rails (6.2.0)
|
||||
@ -488,6 +489,8 @@ GEM
|
||||
telegraf (2.1.1)
|
||||
influxdb
|
||||
temple (0.8.2)
|
||||
terser (1.1.12)
|
||||
execjs (>= 0.3.0, < 3)
|
||||
thor (1.2.1)
|
||||
tilt (2.0.11)
|
||||
timeout (0.3.0)
|
||||
@ -609,6 +612,7 @@ DEPENDENCIES
|
||||
sorcery
|
||||
sprockets-rails
|
||||
telegraf
|
||||
terser
|
||||
tubesock
|
||||
turbolinks
|
||||
web-console
|
||||
|
@ -28,7 +28,10 @@ Rails.application.configure do
|
||||
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
|
||||
|
||||
# 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.
|
||||
config.assets.compile = false
|
||||
|
Reference in New Issue
Block a user