我有兩個問題。資產管道沒有將javascript壓縮到application.js
難道我作出錯誤的假設,我所有的JavaScript的應該是默認甚至在開發模式下軌3.1被壓縮成的application.js?
如果沒有,那麼爲什麼我的標籤有我的JavaScript的所有30個,並採取forver加載?
我的application.js文件看起來像這樣:
//= require jquery
//= require jquery_ujs
//= require jquery-ui
//= require_tree .
並在瀏覽器,因爲它呈現:
// This is a manifest file that'll be compiled into including all the files listed below.
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
// be included in the compiled file accessible from http://example.com/assets/application.js
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// the compiled file.
//
;
雖然我的所有其他的JavaScript以充分呈現。
謝謝一堆!