Skip to content

Commit 1957fd0

Browse files
fix(init): must use urls for asset copying (#2946)
Second attempt to fix #2943 . Turns out that `import.meta.dirname` is `undefined` when served from JSR. I'm not able to reproduce that error locally though. Fixes #2943
1 parent 74d5c0f commit 1957fd0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

init/src/init.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ ${GRADIENT_CSS}`;
395395
await writeFile(
396396
"static/favicon.ico",
397397
await Deno.readFile(
398-
path.join(import.meta.dirname!, "assets", "favicon.ico"),
398+
new URL(import.meta.resolve("./assets/favicon.ico")),
399399
),
400400
);
401401

0 commit comments

Comments
 (0)