5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-15 01:21:42 +00:00

comprimir js

This commit is contained in:
f 2019-09-13 17:26:54 -03:00
parent 27947b9cfb
commit 39e0092c22
No known key found for this signature in database
GPG key ID: 2AE5A13E321F953D
2 changed files with 2 additions and 1 deletions

View file

@ -46,7 +46,7 @@ COPY --chown=app:www-data ./config/credentials.yml.enc ./config/
# Pre-compilar los assets
RUN bundle exec rake assets:precompile
# Comprimirlos usando brotli
RUN find public/assets -type f -name "*.gz" | sed -re "s/\.gz$//" | xargs -r brotli -k -9
RUN find public -type f -name "*.gz" | sed -re "s/\.gz$//" | xargs -r brotli -k -9
# Eliminar la necesidad de un runtime JS en producción, porque los
# assets ya están pre-compilados.

View file

@ -29,6 +29,7 @@ Rails.application.configure do
# Compress CSS using a preprocessor.
config.assets.css_compressor = :sass
config.assets.js_compressor = Uglifier.new(harmony: true)
# Do not fallback to assets pipeline if a precompiled asset is missed.
config.assets.compile = false