Skip to content

Commit 5687727

Browse files
Use ESM version of Turbo
Turbo triggers a `turbo:load` event immediately after it is loaded. If a deferred script (such as a module) adds a listener for `turbo:load`, and Turbo itself is not deferred, then the listener will only be invoked on subsequent visits. This commit replaces the UMD version of Turbo with the ESM version so that its loading is deferred.
1 parent 3c47224 commit 5687727

File tree

2 files changed

+3579
-3608
lines changed

2 files changed

+3579
-3608
lines changed

lib/rdoc/generator/template/rails/_head.rhtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<script src="/js/jquery-3.5.1.min.js" type="text/javascript"></script>
88
<script src="/js/main.js" type="text/javascript"></script>
9-
<script src="/js/@hotwired--turbo.js" type="text/javascript"></script>
9+
<script src="/js/@hotwired--turbo.js" type="module"></script>
1010
<script src="/js/search_index.js" type="text/javascript"></script>
1111
<script src="/js/searcher.js" type="text/javascript"></script>
1212
<script src="/panel/tree.js" type="text/javascript"></script>

0 commit comments

Comments
 (0)