diff --git a/templates/corporate/jobs.html b/templates/corporate/jobs.html
index dd3d96aa33..373809bcd7 100644
--- a/templates/corporate/jobs.html
+++ b/templates/corporate/jobs.html
@@ -1,4 +1,5 @@
{% extends "zerver/portico.html" %}
+{% set entrypoint = "landing-page" %}
{% block title %}
-{{ bundle('landing-page') }}
{% endblock %}
{% block portico_content %}
diff --git a/templates/corporate/upgrade.html b/templates/corporate/upgrade.html
index a4d40c2a44..211ac51568 100644
--- a/templates/corporate/upgrade.html
+++ b/templates/corporate/upgrade.html
@@ -1,9 +1,8 @@
{% extends "zerver/portico.html" %}
+{% set entrypoint = "upgrade" %}
{% block customhead %}
-{{ bundle('landing-page') }}
-{{ bundle('upgrade') }}
{% endblock %}
@@ -13,8 +12,6 @@
{% include 'zerver/billing_nav.html' %}
- {{ bundle('translations') }}
-
diff --git a/templates/corporate/zephyr.html b/templates/corporate/zephyr.html
index 5bd9119513..8f45265c22 100644
--- a/templates/corporate/zephyr.html
+++ b/templates/corporate/zephyr.html
@@ -1,4 +1,5 @@
{% extends "zerver/portico.html" %}
+{% set entrypoint = "landing-page" %}
{% block title %}
Zulip zephyr
@@ -6,7 +7,6 @@
{% block customhead %}
-{{ bundle('landing-page') }}
{% endblock %}
{% block portico_content %}
diff --git a/templates/zerver/app/index.html b/templates/zerver/app/index.html
index 0fbc41ef69..ef17540f9f 100644
--- a/templates/zerver/app/index.html
+++ b/templates/zerver/app/index.html
@@ -1,4 +1,5 @@
{% extends "zerver/base.html" %}
+{% set entrypoint = "app" %}
{# The app itself. #}
{# Includes some other templates as tabs. #}
@@ -6,11 +7,6 @@
{% endblock %}
-{% block commonjs %}
-{{ bundle('app') }}
-{{ bundle('katex') }}
-{% endblock %}
-
{% block customhead %}
diff --git a/templates/zerver/apps.html b/templates/zerver/apps.html
index 6dbbc63298..0a1ebda1cd 100644
--- a/templates/zerver/apps.html
+++ b/templates/zerver/apps.html
@@ -1,11 +1,11 @@
{% extends "zerver/portico.html" %}
+{% set entrypoint = "landing-page" %}
{% block customhead %}
-{{ bundle('landing-page') }}
{% endblock %}
{% block portico_content %}
diff --git a/templates/zerver/archive/index.html b/templates/zerver/archive/index.html
index 7d7417102d..4ef2d694c2 100644
--- a/templates/zerver/archive/index.html
+++ b/templates/zerver/archive/index.html
@@ -1,4 +1,5 @@
{% extends "zerver/base.html" %}
+{% set entrypoint = "archive" %}
{% block customhead %}
@@ -10,13 +11,6 @@
width: auto;
}
-
- {{ bundle('translations') }}
- {{ bundle('katex') }}
- {{ bundle('portico') }}
- {{ bundle('archive') }}
- {{ bundle('archive-styles') }}
-
{% endblock %}
{% block content %}
diff --git a/templates/zerver/atlassian.html b/templates/zerver/atlassian.html
index 736c2fa6be..a36df97fe8 100644
--- a/templates/zerver/atlassian.html
+++ b/templates/zerver/atlassian.html
@@ -1,4 +1,5 @@
{% extends "zerver/portico.html" %}
+{% set entrypoint = "landing-page" %}
{% block title %}
Migrating from HipChat and Stride
@@ -6,8 +7,6 @@
{% block customhead %}
-{{ bundle('landing-page') }}
-
{% endblock %}
{% block portico_content %}
diff --git a/templates/zerver/base.html b/templates/zerver/base.html
index 18f418b0b5..597b28cf75 100644
--- a/templates/zerver/base.html
+++ b/templates/zerver/base.html
@@ -20,25 +20,13 @@
{% include 'zerver/meta_tags.html' %}
{% endif %}
- {% macro bundle(name) %}
- {{ render_entrypoint(name, 'css', attrs='nonce="%s"' % (csp_nonce,) if csp_nonce else '') }}
- {{ render_entrypoint(name, 'js', attrs='defer nonce="%s"' % (csp_nonce,) if csp_nonce else 'defer') }}
- {% endmacro %}
-
-
- {% block commonjs %}
- {{ bundle('common') }}
+ {% block webpack %}
+ {{ render_entrypoint(entrypoint, 'css', attrs='nonce="%s"' % (csp_nonce,) if csp_nonce else '') }}
+ {{ render_entrypoint(entrypoint, 'js', attrs='defer nonce="%s"' % (csp_nonce,) if csp_nonce else 'defer') }}
{% endblock %}
+
{% block customhead %}
{% endblock %}
-
- {# this is required because we want to put a custom head in
- `zerver/portico.html` that isn't overwritten like the
- `customhead` #}
- {% block porticocustomhead %}
- {% endblock %}
@@ -49,3 +37,5 @@