How to skip precompilation of unused vendor assets
In Rails 3.1 "rake assets:precompile" precompiles all separate .css and .js that are in vendor/assets/.. folders. For example, it creates separate precompiled files for jquery, jqueryui libraries and all other files from "vendor" folder.
My web site only references applica开发者_Go百科tion.css and application.js. Why does it precompile every single vendor asset as a separate file? I am not using those files directly. Is there a way to remove those vendor files from precompilation list?
My concern is that it takes extra time and disk space to precompile those files that I will never use in production.
This is actually a bug in 3.1.
The regex that is used to capture assets to precompile was a little to broad and was including files that it wasn't supposed to.
This is fixed in in 3-1-stable, but is after the 3.1.1 RC1 tag so will probably be in 3.1.2.
精彩评论