From 38807539adb9e310f9150fde867aaf190d06c92f Mon Sep 17 00:00:00 2001
From: Fredrik Jonsson <frjo@xdeb.org>
Date: Tue, 25 May 2021 19:00:17 +0200
Subject: [PATCH] Make it possible to set ENABLE_WEBPACK_BUNDLES as an
 environmental variable.

---
 hypha/settings/base.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/hypha/settings/base.py b/hypha/settings/base.py
index 0595d3b2c..574cbf99a 100644
--- a/hypha/settings/base.py
+++ b/hypha/settings/base.py
@@ -660,7 +660,9 @@ REFERRER_POLICY = env.get('SECURE_REFERRER_POLICY',
 
 # Webpack bundle loader
 # When disabled, all included bundles are silently ignored.
-ENABLE_WEBPACK_BUNDLES = True
+if env.get('ENABLE_WEBPACK_BUNDLES', 'true').lower().strip() == 'true':
+    ENABLE_WEBPACK_BUNDLES = True
+
 WEBPACK_LOADER = {
     'DEFAULT': {
         'BUNDLE_DIR_NAME': 'app/',
-- 
GitLab