Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 Rails 7 应用程序。经过一些开发,我发现 Turbo (Hotwired) 产生了太多问题,我不需要它来处理这个应用程序。
有没有办法从现有的 Rails 应用程序中完全删除 Turbo?
删除它的推荐方法是什么?
您需要gem "turbo-rails"从Gemfile, 运行中删除bundle install以更新依赖项。也跑
gem "turbo-rails"
Gemfile
bundle install
bin/importmap unpin @hotwired/turbo-rails bin/importmap unpin @hotwired/stimulus bin/importmap unpin @hotwired/stimulus-loading
import "@hotwired/turbo-rails"并从中删除app/javascript/application.js
import "@hotwired/turbo-rails"
app/javascript/application.js