diff --git a/modules/ui.py b/modules/ui.py
index 0516c6436..2509ce2d0 100644
--- a/modules/ui.py
+++ b/modules/ui.py
@@ -1754,6 +1754,9 @@ def reload_javascript():
for script in modules.scripts.list_scripts("javascript", ".js"):
head += f'\n'
+ for script in modules.scripts.list_scripts("javascript", ".mjs"):
+ head += f'\n'
+
head += f'\n'
def template_response(*args, **kwargs):