-
Notifications
You must be signed in to change notification settings - Fork 755
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(pages): use
realpath
ed tmp dirs to generate valid source maps (#…
…4067) On macOS, `os.tmpdir()` returns a symlink. This causes `esbuild` to generate invalid source maps, as the number of `../` in relative paths changes depending on whether you evaluate symlinks. We previously fixed a similar issues for the middleware loader (https://github.com/cloudflare/workers-sdk/pull/2249/files#diff-17e01c57aa611bb9e0b392a15fd63b5d18602e3a6c9a97c4a34e891bbfdcb7f3R496-R498), and regular `wrangler dev` (be30ee4). Unfortunately, we didn't fix it for `wrangler pages dev`.
- Loading branch information
Showing
5 changed files
with
36 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
"wrangler": patch | ||
--- | ||
|
||
fix: generate valid source maps with `wrangler pages dev` on macOS | ||
|
||
On macOS, `wrangler pages dev` previously generated source maps with an | ||
incorrect number of `../`s in relative paths. This change ensures paths are | ||
always correct, improving support for breakpoint debugging. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters