Skip to content

A platform for community discussion. Free, open, simple.

FIX: Move JS importmap earlier in DOM (#38784)

David Taylor419827bd0cca
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
index 5b07af6a4ce..78559d5d539 100644
--- a/app/views/layouts/application.html.erb
+++ b/app/views/layouts/application.html.erb
@@ -21,6 +21,14 @@
<meta name="shared_session_key" content="<%= shared_session_key %>">
<%- end %>
+ <%= render("layouts/plugin_js", opts: {
+ include_official: allow_plugins?,
+ include_unofficial: allow_third_party_plugins?,
+ request: request,
+ include_admin_asset: staff?
+ }) if ENV["ROLLUP_PLUGIN_COMPILER"] != "0"
+ %>
+
<%= build_plugin_html 'server:before-script-load' %>
<% add_resource_preload_list(script_asset_path("start-discourse"), "script") %>
@@ -47,12 +55,13 @@
<%= preload_script "vendor" %>
<%= preload_script "discourse" %>
- <%= render "layouts/plugin_js", opts: {
+
+ <%= render("layouts/plugin_js", opts: {
include_official: allow_plugins?,
include_unofficial: allow_third_party_plugins?,
request: request,
include_admin_asset: staff?
- }
+ }) if ENV["ROLLUP_PLUGIN_COMPILER"] == "0"
%>
<%- if staff? %>