Repository navigation
feat(bundler-plugins): Enable hidden source maps and remove them after upload in the Rollup plugin - #25645
Conversation
size-limit report 📦Compared: f4db7fc (PR test merge using develop at 6bf0d3e) Against: 10056d4 (develop) · base run #63746
|
aaa1a70 to
02c2650
Compare
Optional E2E testsSome optional checks were not successful. They do not block the merge. 5 not successful, 59 successful. See the run.
Successful checks
|
02c2650 to
d86c896
Compare
…r upload in the Rollup plugin When the Rollup or Rolldown output has no `sourcemap` setting and an upload can run, the plugin switches the output to hidden source maps, copies each chunk and its map into the upload staging folder from `generateBundle`, and drops the map asset so it is never written. `deleteSourcemapsAfterUpload: true` does the same for maps the user enabled. The framework SDKs pass `deleteSourcemapsAfterUpload: false` so their builds do not change.
d86c896 to
bc36a67
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit bc36a67. Configure here.
| await upload(buildArtifacts, { staging }); | ||
| } | ||
| } else { | ||
| await staging?.discard(); |
There was a problem hiding this comment.
Staging lost if upload never runs
Medium Severity
takeStaging pulls the only remaining copy of the maps out of the queue before createRelease or globFiles run, and that copy is discarded only when upload is intentionally skipped. If either call throws, the maps are already gone from the bundle, nothing logs the staging path, and the temp folder is leaked. A later stage() failure in a multi-chunk build has the same gap: earlier maps are already deleted, but the staging is never queued.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit bc36a67. Configure here.
| ); | ||
| decisions.set(getOutputDestination(rawOutputOptions), decision); | ||
|
|
||
| return decision.enableHidden ? { ...rawOutputOptions, sourcemap: 'hidden' } : null; |
There was a problem hiding this comment.
Default change lacks migration notes
Medium Severity
Rollup and Rolldown builds that never set sourcemap now generate hidden maps, upload them, and strip them from the output whenever credentials allow an upload. That is a silent default change for existing sentryRollupPlugin users, and this PR has no changelog or migration note describing it or the sourcemaps.deleteSourcemapsAfterUpload: false opt-out. Flagged because the review rules require migration notes for silent default changes that affect existing apps.
Triggered by project rule: PR Review Guidelines for Cursor Bot
Reviewed by Cursor Bugbot for commit bc36a67. Configure here.


Part of the stack for #25609. When the Rollup or Rolldown output has no
sourcemapsetting and an upload can run, the plugin switches the output to hidden source maps, copies each chunk and its map into the upload staging folder from agenerateBundlehook that runs last, and drops the map asset so it is never written.deleteSourcemapsAfterUpload: truedoes the same for maps the user enabled; a chunk the plugin cannot prepare keeps its map, with a warning.The framework SDKs pass
deleteSourcemapsAfterUpload: false, so their builds do not change until each one migrates in its own PR.