diff --git a/panel/template/bootstrap/bootstrap.html b/panel/template/bootstrap/bootstrap.html
index 4df3c07ced..762a001e89 100644
--- a/panel/template/bootstrap/bootstrap.html
+++ b/panel/template/bootstrap/bootstrap.html
@@ -32,10 +32,16 @@
{%- if manifest %}
{% endif -%}
+
+ {% for src in template_resources['js'].values() %}
+
+ {% endfor %}
+ {% for src in template_resources['js_modules'].values() %}
+
+ {% endfor %}
{% endblock %}
{% block postamble %}
-
{% for css in template_resources['css'].values() %}
@@ -64,13 +70,6 @@
}
-
- {% for src in template_resources['js'].values() %}
-
- {% endfor %}
- {% for src in template_resources['js_modules'].values() %}
-
- {% endfor %}
{% endblock %}