fix: change script tags from 'defer' to 'type=module' for ES modules

Change script loading from deprecated 'defer' attribute to 'type=module'
for main.js across all templates. This ensures proper ES module loading
and is required for the reader module system to work correctly.
This commit is contained in:
2026-04-06 16:02:45 -04:00
parent ece77ed1be
commit 5da573c007
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -67,7 +67,7 @@ func Header(user User, currentPath string) templ.Component {
return templ_7745c5c3_Err
}
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "</div></div></div></div></nav><script src=\"/static/main.js\" defer></script>")
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "</div></div></div></div></nav><script type=\"module\" src=\"/static/main.js\"></script>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}