Skip to content

Commit b360120

Browse files
Use entry_point as cache_key when generating preload tags (#266)
1 parent cc7142e commit b360120

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: app/helpers/importmap/importmap_tags_helper.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def javascript_import_module_tag(*module_names)
2525
# (defaults to Rails.application.importmap), such that they'll be fetched
2626
# in advance by browsers supporting this link type (https://caniuse.com/?search=modulepreload).
2727
def javascript_importmap_module_preload_tags(importmap = Rails.application.importmap, entry_point: "application")
28-
javascript_module_preload_tag(*importmap.preloaded_module_paths(resolver: self, entry_point:))
28+
javascript_module_preload_tag(*importmap.preloaded_module_paths(resolver: self, entry_point:, cache_key: entry_point))
2929
end
3030

3131
# Link tag(s) for preloading the JavaScript module residing in `*paths`. Will return one link tag per path element.

0 commit comments

Comments
 (0)