Skip to content

Commit c193dbc

Browse files
logaretmclaude
andcommitted
fix(nitro): Preserve debug IDs and source maps when disable-upload is set
When `sourcemaps.disable` is `'disable-upload'`, the plugin should still inject debug IDs and keep `.map` files so users can upload them manually. Previously, both `injectDebugIds()` and `deleteArtifacts()` were incorrectly gated or ungated, causing debug IDs to be skipped and source maps to be deleted even in the manual-upload workflow. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent db07c1c commit c193dbc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/nitro/src/sourceMaps.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@ async function handleSourceMapUpload(nitro: Nitro, options?: SentryNitroOptions)
3939
await sentryBuildPluginManager.telemetry.emitBundlerPluginExecutionSignal();
4040
await sentryBuildPluginManager.createRelease();
4141

42+
await sentryBuildPluginManager.injectDebugIds([outputDir]);
43+
4244
if (options?.sourcemaps?.disable !== 'disable-upload') {
43-
await sentryBuildPluginManager.injectDebugIds([outputDir]);
4445
await sentryBuildPluginManager.uploadSourcemaps([outputDir], {
4546
// We don't prepare the artifacts because we injected debug IDs manually before
4647
prepareArtifacts: false,
4748
});
49+
await sentryBuildPluginManager.deleteArtifacts();
4850
}
49-
50-
await sentryBuildPluginManager.deleteArtifacts();
5151
}
5252

5353
/**

0 commit comments

Comments
 (0)