fix(init): must use urls for asset copying (#2946)
Second attempt to fix https://github.com/denoland/fresh/pull/2943 . Turns out that `import.meta.dirname` is `undefined` when served from JSR. I'm not able to reproduce that error locally though. Fixes https://github.com/denoland/fresh/pull/2943
This commit is contained in:
+1
-1
@@ -395,7 +395,7 @@ ${GRADIENT_CSS}`;
|
||||
await writeFile(
|
||||
"static/favicon.ico",
|
||||
await Deno.readFile(
|
||||
path.join(import.meta.dirname!, "assets", "favicon.ico"),
|
||||
new URL(import.meta.resolve("./assets/favicon.ico")),
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user