File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,15 @@ class Engine < ::Rails::Engine
3030 app . config . importmap . paths << Engine . root . join ( 'config/importmap.rb' ) if Rails . application . respond_to? ( :importmap )
3131 end
3232
33+ initializer "importmap_mocha.cache_sweeper" , before : "importmap.cache_sweeper" do |app |
34+ if app . config . importmap . sweep_cache && !app . config . cache_classes
35+ app . config . importmap . cache_sweepers << Engine . root . join ( 'app/assets/javascripts' )
36+ app . config . importmap . cache_sweepers << Engine . root . join ( 'vendor/javascripts' )
37+ app . config . importmap . cache_sweepers += Rails . application . config . importmap_mocha_path
38+ end
39+ end
40+
41+
3342 initializer 'importmap_mocha.routes' do
3443 Rails . application . routes . prepend do
3544 scope module : 'importmap_mocha' do
You can’t perform that action at this time.
0 commit comments