Repository navigation
feat(bundler-plugins): Enable hidden source maps and remove them after upload in the webpack plugin - #25647
Conversation
size-limit report 📦Compared: c1db115 (PR test merge using develop at 994d452) Against: 10056d4 (develop) · base run #63746
|
c0e6cee to
4709561
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
|
4709561 to
63db386
Compare
63db386 to
247acf4
Compare
…r upload in the webpack plugin When `devtool` is unset and an upload can run, the plugin sets `hidden-source-map`, copies each JS asset and its map into the upload staging folder at the end of `processAssets` and deletes the map assets, so webpack never emits them. A `devtool` with a manual `SourceMapDevToolPlugin` and development builds stay untouched.
247acf4 to
e7fe1ce
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.
Reviewed by Cursor Bugbot for commit e7fe1ce. Configure here.
| await upload(buildArtifacts); | ||
| await upload(buildArtifacts, { staging }); | ||
| } else { | ||
| await staging?.discard(); |
There was a problem hiding this comment.
Release errors leak staged source maps
Medium Severity
pendingStagings.delete runs before createRelease(), so a throw there never reaches upload and the done/failed discard path no longer sees the folder. The maps were already stripped from the compilation, so they are neither emitted, uploaded, nor kept with a recovery path like a failed upload.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit e7fe1ce. Configure here.


Part of the stack for #25609. When
devtoolis unset and an upload can run, the plugin setshidden-source-map; a visible devtool withdeleteSourcemapsAfterUpload: truegets thehidden-prefix. The maps are staged at the end ofprocessAssets, after the real content hashes are in place, and deleted from the compilation together with any compressed variants, so webpack never emits them.Development builds and a
devtool: falsewith a manualSourceMapDevToolPluginstay untouched. Rspack uses the same hooks but is not covered by tests, because@rspack/coreis not installed in the repo.