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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user