Skip to content

Commit cca62ba

Browse files
committed
fix preload path
1 parent 1faef4a commit cca62ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/render.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ ${
5858
${JSON.stringify({imports: Object.fromEntries(Array.from(imports, ([name, href]) => [name, href]))}, null, 2)}
5959
</script>
6060
${Array.from(imports.values())
61-
.concat(parseResult.imports.map(({name}) => name).filter((name) => name.startsWith("./")))
61+
.concat(parseResult.imports.filter(({name}) => name.startsWith("./")).map(({name}) => `/_file/${name.slice(2)}`))
6262
.map((href) => `<link rel="modulepreload" href="${href}">`)
6363
.join("\n")}
6464
<script type="module">

0 commit comments

Comments
 (0)