Make script a module

This commit is contained in:
Svilen Markov 2024-06-11 12:11:49 +01:00
parent 122d05346b
commit 917d51e54b
2 changed files with 2 additions and 6 deletions

View File

@ -570,8 +570,4 @@ async function setupPage() {
}
}
if (document.readyState === "loading") {
document.addEventListener("DOMContentLoaded", setupPage);
} else {
setupPage();
}

View File

@ -16,7 +16,7 @@
<link rel="manifest" href="/static/manifest.json">
<link rel="icon" type="image/png" href="{{ .App.AssetPath "favicon.png" }}" />
<link rel="stylesheet" href="{{ .App.AssetPath "main.css" }}">
<script async src="{{ .App.AssetPath "main.js" }}"></script>
<script type="module" src="{{ .App.AssetPath "main.js" }}"></script>
{{ block "document-head-after" . }}{{ end }}
</head>
<body>