Repository navigation
feat(bundler-plugins): Enable external source maps and delete them after upload in the esbuild plugin - #25648
Conversation
size-limit report 📦Compared: be5cd11 (PR test merge using develop at c1db115) Against: 10056d4 (develop) · base run #63746
|
0d05fc7 to
73fee34
Compare
Optional E2E testsSome optional checks were not successful. They do not block the merge. 4 not successful, 60 successful. See the run.
Successful checks
|
73fee34 to
4040760
Compare
3885821 to
62b848d
Compare
…ter upload in the esbuild plugin esbuild writes its output before `onEnd` runs and has no hook to drop an output, so the maps are deleted from disk after a successful upload instead. When the upload fails they stay, with an error log.
62b848d to
f5d5367
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit f5d5367. Configure here.
|
|
||
| if (options.sourcemaps?.disable !== 'disable-upload') { | ||
| await upload(buildArtifacts); | ||
| const { uploaded } = await upload(buildArtifacts); |
There was a problem hiding this comment.
Resolved paths break Windows uploads
High Severity
Metafile outputs are now passed through path.resolve before upload. Those platform-native paths go into glob, which still treats \ as an escape unless windowsPathsNoEscape is set, so Windows matches fail. Upload then reports uploaded: false, the new external maps are left on disk, and even previously working sourcemap: true builds stop uploading.
Reviewed by Cursor Bugbot for commit f5d5367. Configure here.


Part of the stack for #25609. esbuild writes its output before
onEndruns and has no hook to drop an output, so the plugin setssourcemap: 'external'when the setting is unset and deletes the.mapoutputs listed in the metafile after a successful upload. When the upload fails the maps stay, with an error log.The metafile lists outputs relative to
absWorkingDir, while the upload globbed them from the process working directory, so builds with anabsWorkingDirelsewhere uploaded nothing. The paths are now resolved againstabsWorkingDirfirst.