Skip to content

Commit

Permalink
Subfolder Relative Pathing Fix (#157)
Browse files Browse the repository at this point in the history
* Relative pathing Fix
- filename from args didnt handle relative pathing
- added a path.relative using cwd to filepath arg

* Create early-games-buy.md
  • Loading branch information
JacobMGEvans authored Dec 28, 2021
1 parent ce2d7d1 commit 1fdcfe3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .changeset/early-games-buy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"wrangler": patch
---

Subfolder Relative Pathing Fix issue #147
The filename from args didn't handle relative paths passed in from users with scripts in subfolders.
To handle the subfolder pathing a path.relative using cwd() to user input filepath to the filepath variable passed into Dev
2 changes: 1 addition & 1 deletion packages/wrangler/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ export async function main(argv: string[]): Promise<void> {
render(
<Dev
name={args.name || config.name}
entry={filename}
entry={path.relative(process.cwd(), filename)}
buildCommand={config.build || {}}
format={format}
initialMode={args.local ? "local" : "remote"}
Expand Down

0 comments on commit 1fdcfe3

Please sign in to comment.