File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -20,9 +20,17 @@ class Engine < Rails::Engine
2020 Rails . autoloaders . once . do_not_eager_load ( Dir [ "#{ root } /app/channels/turbo/*_channel.rb" ] ) unless defined? ( ActionCable )
2121 end
2222
23+ # If you don't want to precompile Turbo's assets (eg. because you're using webpack),
24+ # you can do this in an intiailzer:
25+ #
26+ # config.after_initialize do
27+ # config.assets.precompile -= Turbo::Engine::PRECOMPILE_ASSETS
28+ # end
29+ PRECOMPILE_ASSETS = %w( turbo.js turbo.min.js )
30+
2331 initializer "turbo.assets" do
2432 if Rails . application . config . respond_to? ( :assets )
25- Rails . application . config . assets . precompile += %w( turbo.js turbo.min.js )
33+ Rails . application . config . assets . precompile += PRECOMPILE_ASSETS
2634 end
2735 end
2836
You can’t perform that action at this time.
0 commit comments