Skip to content

Commit 00f6b8e

Browse files
author
Luca Forstner
committed
fix: Use sourcemaps.disable to disable debug ID upload instead of legacy upload
1 parent 28bf630 commit 00f6b8e

File tree

1 file changed

+7
-6
lines changed
  • packages/bundler-plugin-core/src

1 file changed

+7
-6
lines changed

packages/bundler-plugin-core/src/index.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -307,9 +307,7 @@ export function sentryUnpluginFactory({
307307
plugins.push(moduleMetadataInjectionPlugin(injectionCode));
308308
}
309309

310-
if (options.sourcemaps?.disable) {
311-
logger.debug("Source map upload was disabled. Will not upload sourcemaps.");
312-
} else if (!options.release.name) {
310+
if (!options.release.name) {
313311
logger.warn(
314312
"No release name provided. Will not create release. Please set the `release.name` option to identify your release."
315313
);
@@ -353,9 +351,11 @@ export function sentryUnpluginFactory({
353351
);
354352
}
355353

356-
plugins.push(debugIdInjectionPlugin(logger));
357-
358-
if (!options.authToken) {
354+
if (options.sourcemaps?.disable) {
355+
logger.debug(
356+
"Source map upload was disabled. Will not upload sourcemaps using debug ID process."
357+
);
358+
} else if (!options.authToken) {
359359
logger.warn(
360360
"No auth token provided. Will not upload source maps. Please set the `authToken` option. You can find information on how to generate a Sentry auth token here: https://docs.sentry.io/api/auth/"
361361
);
@@ -369,6 +369,7 @@ export function sentryUnpluginFactory({
369369
);
370370
} else {
371371
plugins.push(
372+
debugIdInjectionPlugin(logger),
372373
debugIdUploadPlugin(
373374
createDebugIdUploadFunction({
374375
assets: options.sourcemaps?.assets,

0 commit comments

Comments
 (0)