File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,9 @@ class Engine < ::Rails::Engine
26
26
27
27
initializer "importmap.cache_sweeper" do |app |
28
28
if app . config . importmap . sweep_cache
29
- app . importmap . cache_sweeper watches : app . root . join ( "app/javascript" )
29
+ app . importmap . cache_sweeper watches : [
30
+ app . root . join ( "app/javascript" ) , app . root . join ( "vendor/javascript" )
31
+ ]
30
32
31
33
ActiveSupport . on_load ( :action_controller_base ) do
32
34
before_action { Rails . application . importmap . cache_sweeper . execute_if_updated }
@@ -38,6 +40,7 @@ class Engine < ::Rails::Engine
38
40
if Rails . application . config . respond_to? ( :assets )
39
41
Rails . application . config . assets . precompile += %w( es-module-shims.js es-module-shims.min.js )
40
42
Rails . application . config . assets . paths << Rails . root . join ( "app/javascript" )
43
+ Rails . application . config . assets . paths << Rails . root . join ( "vendor/javascript" )
41
44
end
42
45
end
43
46
Original file line number Diff line number Diff line change @@ -10,9 +10,9 @@ class Importmap::Packager
10
10
singleton_class . attr_accessor :endpoint
11
11
self . endpoint = URI ( "https://api.jspm.io/generate" )
12
12
13
- def initialize ( importmap_path = "config/importmap.rb" , vendor_path : Pathname . new ( "app /javascript/vendor" ) )
14
- @importmap_path = importmap_path
15
- @vendor_path = vendor_path
13
+ def initialize ( importmap_path = "config/importmap.rb" , vendor_path : "vendor /javascript" )
14
+ @importmap_path = Pathname . new ( importmap_path )
15
+ @vendor_path = Pathname . new ( vendor_path )
16
16
end
17
17
18
18
def import ( *packages , env : "production" , from : "jspm" )
You can’t perform that action at this time.
0 commit comments