Skip to content

Commit ae03834

Browse files
committed
fix: path loading
1 parent c27bde5 commit ae03834

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/runtime/loader.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { walk } from "@std/fs";
22
import { parseArgs as parse } from "@std/cli";
3-
import { basename, join } from "@std/path";
3+
import { basename, join, toFileUrl } from "@std/path";
44

55
const flags = parse(Deno.args, {
66
string: ["root"],
@@ -31,7 +31,10 @@ for await (const path of walk(flags.root)) {
3131
console.info("Load script", path.path);
3232

3333
const worker = new Worker(
34-
new URL(join(Deno.cwd(), path.path), import.meta.url).href,
34+
new URL(
35+
join(Deno.cwd(), path.path),
36+
toFileUrl(join(Deno.cwd(), flags.root!))
37+
).href,
3538
{
3639
type: "module",
3740
deno: {

0 commit comments

Comments
 (0)