Skip to content

Commit

Permalink
don’t preload async (#1124)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbostock committed Mar 22, 2024
1 parent 75f0c1c commit d3b28a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/html.ts
Expand Up @@ -89,7 +89,7 @@ export function findAssets(html: string, path: string): Assets {
} else {
globalImports.add(src);
}
if (script.getAttribute("type")?.toLowerCase() === "module") {
if (script.getAttribute("type")?.toLowerCase() === "module" && !script.hasAttribute("async")) {
staticImports.add(src); // modulepreload
}
} else {
Expand Down

0 comments on commit d3b28a1

Please sign in to comment.