Skip to content

Commit

Permalink
resolve singlerWorkerScriptPath
Browse files Browse the repository at this point in the history
  • Loading branch information
dario-piotrowicz committed Jan 7, 2024
1 parent df71f26 commit fcde4fc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/eighty-hotels-train.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"wrangler": patch
---

make sure the script path is correctly resolved in `pages dev` when no directory is specified
2 changes: 1 addition & 1 deletion packages/wrangler/src/pages/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ export const Handler = async ({
const workerScriptPath =
directory !== undefined
? join(directory, singleWorkerScriptPath)
: singleWorkerScriptPath;
: resolve(singleWorkerScriptPath);
const usingWorkerDirectory =
existsSync(workerScriptPath) && lstatSync(workerScriptPath).isDirectory();
const usingWorkerScript = existsSync(workerScriptPath);
Expand Down

0 comments on commit fcde4fc

Please sign in to comment.