Repository navigation
feat(bundler-plugins): Enable hidden source maps and remove them after upload in the Vite plugin - #25646
Conversation
size-limit report 📦Compared: 100a68b (PR test merge using develop at 3357465) Against: 9310b4d (develop) · base run #64276
|
ac0df2a to
6546bd8
Compare
Optional E2E testsSome optional checks were not successful. They do not block the merge. 2 not successful, 55 successful. See the run.
Successful checks
|
6546bd8 to
30717e0
Compare
30717e0 to
f2ee9aa
Compare
f2ee9aa to
9d1b219
Compare
9d1b219 to
4f7189e
Compare
4f7189e to
8469e6d
Compare
a0b6719 to
e9fb9ac
Compare
e9fb9ac to
7047dc0
Compare
7047dc0 to
9f8b785
Compare
9f8b785 to
2e4c2ee
Compare
2e4c2ee to
f8dc498
Compare
2beac82 to
d07dc27
Compare
d07dc27 to
47ac301
Compare
47ac301 to
8aacc02
Compare
8aacc02 to
06117c3
Compare
06117c3 to
b4b8cfd
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 b4b8cfd. Configure here.
|
|
||
| const environmentKind = sourceMapKindFromRollupSetting(setting); | ||
| const environmentDecision = sentryBuildPluginManager.sourceMaps.decide(environmentKind); | ||
| decisions.set(name, { kind: environmentKind, decision: environmentDecision }); |
There was a problem hiding this comment.
Stale environment decisions across builds
Low Severity
The decisions map is never cleared when config runs. Reusing the same plugin instances, which the client-then-SSR path does, keeps named environment entries from the previous config. A later build then applies those stale decisions if the environment no longer sets sourcemap itself.
Reviewed by Cursor Bugbot for commit b4b8cfd. Configure here.
…r upload in the Vite plugin The Vite plugin decides on `build.sourcemap` in its `config` hook, because Vite warns about `rollupOptions.output.sourcemap`, and maps the decision onto each environment's output directory in `configResolved`. The post plugin that restores debug IDs for `disable-upload` builds is now always present and also stages the source maps for upload.
b4b8cfd to
7196d7f
Compare


Part of the stack for #25609. Vite warns about
rollupOptions.output.sourcemap, so the Vite plugin decides onbuild.sourcemapin aconfighook on the post plugin, which runs after framework plugins that setbuild.sourcemapthemselves.configResolvedthen records one decision per output ofrollupOptions.outputand per Vite 6 environment, and the shared RollupgenerateBundlehook does the staging. An output or environment that setssourcemapitself is never changed; only hidden maps the user asked to delete are removed there.A client build and an SSR build of the same plugin instances stage on their own, keyed by output directory. Builds with
build.write: falsedo not create a staging folder. Integration fixtures coversourcemaps.ignoreandsourcemaps.assetson the staged path for Vite 8.