<p></p>
<p><b>@grekko</b> commented on this pull request.</p>
<hr>
<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/4562#discussion_r1532751216">app/views/layouts/_head.html.erb</a>:</p>
<pre style='color:#555'>> @@ -2,6 +2,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<%= javascript_include_tag "es6" unless browser.es6? %>
+ <%= javascript_include_tag "turbo", :type => "module" %>
</pre>
<p dir="auto">This is the only way I was able to import Turbo (which comes bundled in ESM format in the <code class="notranslate">turbo-rails</code>-gem).</p>
<p dir="auto">Trying to import it inside the <code class="notranslate">application.js</code> with Sprockets raises errors:</p>
<div class="highlight highlight-source-diff" dir="auto"><pre class="notranslate"><span class="pl-c1">diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js</span>
index c71c0652d..25ca33d34 100644
<span class="pl-md">--- a/app/assets/javascripts/application.js</span>
<span class="pl-mi1">+++ b/app/assets/javascripts/application.js</span>
<span class="pl-mdr">@@ -18,6 +18,7 @@</span>
//= require qs/dist/qs
//= require bs-custom-file-input
//= require bs-custom-file-input-init
<span class="pl-mi1"><span class="pl-mi1">+</span>//= require turbo</span>
/*
* Called as the user scrolls/zooms around to manipulate hrefs of the
<span class="pl-c1">diff --git a/app/views/layouts/_head.html.erb b/app/views/layouts/_head.html.erb</span>
index 3c691612a..0ee5bf9c0 100644
<span class="pl-md">--- a/app/views/layouts/_head.html.erb</span>
<span class="pl-mi1">+++ b/app/views/layouts/_head.html.erb</span>
<span class="pl-mdr">@@ -2,7 +2,6 @@</span>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<%= javascript_include_tag "es6" unless browser.es6? %>
<span class="pl-md"><span class="pl-md">-</span> <%= javascript_include_tag "turbo", :type => "module" %></span>
<%= javascript_include_tag "application" %>
<%= javascript_include_tag "i18n/#{I18n.locale}" %>
<%= stylesheet_link_tag "screen-#{dir}", :media => "screen" %></pre></div>
<p dir="auto"><a href="https://github.com/openstreetmap/openstreetmap-website/assets/28648/914c1b79-6308-47c5-a23b-a2f11c48e60d">SCR-20240320-rxmw.png (view on web)</a></p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/4562#discussion_r1532751216">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLMI2PLHCLVB42X3VUDYZHRHTAVCNFSM6AAAAABEIVPY5KVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTSNBZHE4DKMRVGE">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLI7MGMKOQD2H4MCOPTYZHRHTA5CNFSM6AAAAABEIVPY5KWGG33NNVSW45C7OR4XAZNRKB2WY3CSMVYXKZLTORJGK5TJMV32UY3PNVWWK3TUL5UWJTTUHJU6G.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/pull/4562/review/1949985251</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/4562#discussion_r1532751216",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/4562#discussion_r1532751216",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>