fix: make sure to run spa last

Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
This commit is contained in:
Aaron Pham 2025-01-01 11:55:23 -08:00
parent e978cd8993
commit c7707322f9
No known key found for this signature in database
GPG Key ID: 18974753009D2BFA

View File

@ -53,12 +53,6 @@ export function pageResources(
script: contentIndexScript,
},
...staticResources.js,
{
src: joinSegments(baseDir, "postscript.js"),
loadTime: "afterDOMReady",
moduleType: "module",
contentType: "external",
},
],
}
@ -72,6 +66,14 @@ export function pageResources(
resources.css.push({ content: mermaidStyle, inline: true })
}
// NOTE: we have to put this last to make sure spa.inline.ts is the last item.
resources.js.push({
src: joinSegments(baseDir, "postscript.js"),
loadTime: "afterDOMReady",
moduleType: "module",
contentType: "external",
})
return resources
}