Skip to content

Commit

Permalink
Proper format
Browse files Browse the repository at this point in the history
  • Loading branch information
colecrouter committed Jan 27, 2022
1 parent 10867b7 commit f9bd246
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/tall-worms-suffer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"wrangler": patch
---

Fixed paths not working on Windows, see #92
2 changes: 1 addition & 1 deletion packages/wrangler/pages/functions/filepath-routing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export async function generateConfigFromFileTree({
routePath = "";
}

routePath = `${baseURL}/${routePath}`;
routePath = `${baseURL}/${routePath}`.replace(/\\/g, "/");

routePath = routePath.replace(/\[\[(.+)]]/g, ":$1*"); // transform [[id]] => :id*
routePath = routePath.replace(/\[(.+)]/g, ":$1"); // transform [id] => :id
Expand Down

0 comments on commit f9bd246

Please sign in to comment.