1
Started GET "/assets/bootstrap-transition.js?body=1" for 64.124.65.162 at 2013-07-19   14:40:24 +0000
Served asset /bootstrap-transition.js - 304 Not Modified (0ms)


Started GET "/assets/bootstrap-button.js?body=1" for 64.124.65.162 at 2013-07-19 14:40:24    +0000
Served asset /bootstrap-button.js - 304 Not Modified (0ms)


Started GET "/assets/bootstrap-carousel.js?body=1" for 64.124.65.162 at 2013-07-19 14:40:24 +0000
Served asset /bootstrap-carousel.js - 304 Not Modified (9ms)

以上是我从 Rails 服务器输出的一部分。如果我的应用程序不使用轮播,或者打算使用一个...我不应该加载 javascript。如何选择要加载的引导文件?我正在使用 bootstrap-sass gem,我的 application.js 看起来像

//= require jquery
//= require jquery_ujs
//= require bootstrap
//= require_tree .
4

1 回答 1

2

以下是bootstrap-sassgem 使用的文件名。随意删除不需要的插件。文件在此处列出,并在此处的自述文件中提及

//= require bootstrap-transition
//= require bootstrap-affix
//= require bootstrap-alert
//= require bootstrap-button
//= require bootstrap-carousel
//= require bootstrap-collapse
//= require bootstrap-dropdown
//= require bootstrap-modal
//= require bootstrap-scrollspy
//= require bootstrap-tab
//= require bootstrap-tooltip
//= require bootstrap-popover
//= require bootstrap-typeahead
于 2013-07-19T15:06:30.410 回答