Skip to content

Commit ef55438

Browse files
committed
Check if importmap is available
1 parent 42137e0 commit ef55438

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/requestjs/engine.rb

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ class Engine < ::Rails::Engine
77
end
88

99
initializer "requestjs.importmap", before: "importmap" do |app|
10-
app.config.importmap.paths << Engine.root.join("config/importmap.rb")
10+
if Rails.application.respond_to?(:importmap)
11+
app.config.importmap.paths << Engine.root.join("config/importmap.rb")
12+
end
1113
end
1214
end
1315
end

0 commit comments

Comments
 (0)