Skip to content

Commit c104b3b

Browse files
author
DevBot
committed
fix(reader): /dist/ path resolution — double dist/ bug
1 parent 94bbd59 commit c104b3b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • examples/deno-desktop-reader

examples/deno-desktop-reader/main.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,8 @@ Deno.serve((req: Request) => {
137137

138138
// Static assets from dist/
139139
if (pathname.startsWith("/dist/")) {
140-
const file = readFileSafe(new URL(`.${pathname}`, DIST_DIR));
140+
const name = pathname.slice("/dist/".length);
141+
const file = readFileSafe(new URL(`./${name}`, DIST_DIR));
141142
return file ? serveFile(file, ext) : notFound();
142143
}
143144

0 commit comments

Comments
 (0)