Skip to content

Commit ceae06d

Browse files
author
Luca Forstner
authored
fix: Use sourcemaps.disable to disable debug ID upload instead of legacy upload (#587)
1 parent 28bf630 commit ceae06d

File tree

1 file changed

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

1 file changed

+6
-4
lines changed

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

Lines changed: 6 additions & 4 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
);
@@ -355,7 +353,11 @@ export function sentryUnpluginFactory({
355353

356354
plugins.push(debugIdInjectionPlugin(logger));
357355

358-
if (!options.authToken) {
356+
if (options.sourcemaps?.disable) {
357+
logger.debug(
358+
"Source map upload was disabled. Will not upload sourcemaps using debug ID process."
359+
);
360+
} else if (!options.authToken) {
359361
logger.warn(
360362
"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/"
361363
);

0 commit comments

Comments
 (0)