mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-15 01:21:42 +00:00
comprimir js
This commit is contained in:
parent
27947b9cfb
commit
39e0092c22
2 changed files with 2 additions and 1 deletions
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue