Rails config.assets.precompile setting to process all CSS and JS files in app/assets

后端 未结 8 1602
粉色の甜心
粉色の甜心 2020-11-28 06:42

I wish to precompile all the CSS and JS files in my project\'s app/assets folder. I do NOT want to precompile everything in vendor/assets or lib/assets, only th

8条回答
  •  误落风尘
    2020-11-28 07:13

    A slight tweak to techpeace's answer:

    config.assets.precompile = ['*.js', '*.css', '**/*.js', '**/*.css']

    I would've added a comment to his answer but I don't have enough reputation yet. Give me an upvote and I'll be there!

    NOTE: this will also precompile all the CSS/JavaScript included via rubygems.

提交回复
热议问题