-
Notifications
You must be signed in to change notification settings - Fork 688
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When applying facades, we write intermediate files to a temporary directory and then build them with `esbuild`. This outputs intermediate source maps, which get merged in the final bundle step to produce a final source map. On macOS, `os.tmpdir()` looks like `/var/folders/.../.../T`. `/var` is a symlink to `/private/var`. Unfortunately, source maps end up assuming files in `/var`, not `/private/var`, leading to invalid stack traces like `/private/Users/.../d1-beta-facade.js:101:12`. This change uses `realpathSync` to fully-resolve all symlinks before we pass paths containing the temporary directory to `esbuild` for source map generation. We actually implemented this same change in #2249 for the middleware loader facade, but not the rest.
- Loading branch information
Showing
1 changed file
with
11 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