lib/importmap/engine.rb in importmap-rails-1.1.6 vs lib/importmap/engine.rb in importmap-rails-1.2.0

- old
+ new

@@ -18,18 +18,20 @@ app.config.importmap.paths << app.root.join("config/importmap.rb") app.config.importmap.paths.each { |path| app.importmap.draw(path) } end initializer "importmap.reloader" do |app| - Importmap::Reloader.new.tap do |reloader| - reloader.execute - app.reloaders << reloader - app.reloader.to_run { reloader.execute } + unless app.config.cache_classes + Importmap::Reloader.new.tap do |reloader| + reloader.execute + app.reloaders << reloader + app.reloader.to_run { reloader.execute } + end end end initializer "importmap.cache_sweeper" do |app| - if app.config.importmap.sweep_cache + if app.config.importmap.sweep_cache && !app.config.cache_classes app.config.importmap.cache_sweepers << app.root.join("app/javascript") app.config.importmap.cache_sweepers << app.root.join("vendor/javascript") app.importmap.cache_sweeper(watches: app.config.importmap.cache_sweepers) ActiveSupport.on_load(:action_controller_base) do