gpt4 book ai didi

javascript - Rails 应用程序 : require bootstrap vs require bootstrap-sprockets

转载 作者:数据小太阳 更新时间:2023-10-29 04:18:05 24 4
gpt4 key购买 nike

添加之间的相应区别是什么

//= require bootstrap-sprockets

//= require bootstrap

到 application.js?

documentation说:

bootstrap-sprockets provides individual Bootstrap Javascript files (alert.js or dropdown.js, for example), while bootstrap provides a concatenated file containing all Bootstrap Javascripts

一个提供比另一个更好的性能吗?

最佳答案

需要 bootstrap 而不是 bootstrap-sprockets 以加快编译速度。

需要 bootstrap-sprockets 而不是 bootstrap 以便于调试。

While bootstrap-sprockets provides individual Bootstrap components for ease of debugging, you may alternatively require the concatenated bootstrap for faster compilation

https://github.com/twbs/bootstrap-rubygem#a-ruby-on-rails

关于javascript - Rails 应用程序 : require bootstrap vs require bootstrap-sprockets,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33463054/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com