Add .mjs support for extensions

This commit is contained in:
fkunn1326@users.noreply.github.com 2023-02-23 03:29:22 +00:00
parent 0cc0ee1bcb
commit b90cad7f31

View File

@ -1754,6 +1754,9 @@ def reload_javascript():
for script in modules.scripts.list_scripts("javascript", ".js"):
head += f'<script type="text/javascript" src="file={script.path}?{os.path.getmtime(script.path)}"></script>\n'
for script in modules.scripts.list_scripts("javascript", ".mjs"):
head += f'<script type="module" src="file={script.path}?{os.path.getmtime(script.path)}"></script>\n'
head += f'<script type="text/javascript">{inline}</script>\n'
def template_response(*args, **kwargs):