Best way to combine and minify JS / CSS on Heroku

后端 未结 8 1302
梦谈多话
梦谈多话 2020-12-24 06:39

First of all, according to this answer, the :cache => true option on stylesheet_link_tag and javascript_include_tag doesn\'t work o

8条回答
  •  无人及你
    2020-12-24 07:11

    Here are the config options to compress your assets.

    http://guides.rubyonrails.org/asset_pipeline.html#customizing-the-pipeline

    config.assets.css_compressor = :yui
    config.assets.js_compressor = :uglifier
    config.assets.compress = true
    
    
    gem 'uglifier'
    gem 'yui-compressor'
    

提交回复
热议问题