From ae038346f077bd7e8c01ce1845bcedde61d62fce Mon Sep 17 00:00:00 2001 From: Nils Bergmann Date: Thu, 30 May 2024 21:08:45 +0200 Subject: [PATCH] fix: path loading --- src/runtime/loader.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/runtime/loader.ts b/src/runtime/loader.ts index ae8c08c..f5c6929 100644 --- a/src/runtime/loader.ts +++ b/src/runtime/loader.ts @@ -1,6 +1,6 @@ import { walk } from "@std/fs"; import { parseArgs as parse } from "@std/cli"; -import { basename, join } from "@std/path"; +import { basename, join, toFileUrl } from "@std/path"; const flags = parse(Deno.args, { string: ["root"], @@ -31,7 +31,10 @@ for await (const path of walk(flags.root)) { console.info("Load script", path.path); const worker = new Worker( - new URL(join(Deno.cwd(), path.path), import.meta.url).href, + new URL( + join(Deno.cwd(), path.path), + toFileUrl(join(Deno.cwd(), flags.root!)) + ).href, { type: "module", deno: {