From ff7b0fb310b0be0b2525518b46b827becdd2fd66 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Mon, 12 Aug 2024 17:40:18 +0200 Subject: [PATCH] fix: Use `sourcemaps.disable` to disable debug ID upload instead of legacy upload --- packages/bundler-plugin-core/src/index.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/bundler-plugin-core/src/index.ts b/packages/bundler-plugin-core/src/index.ts index b69aca73..94c24278 100644 --- a/packages/bundler-plugin-core/src/index.ts +++ b/packages/bundler-plugin-core/src/index.ts @@ -307,9 +307,7 @@ export function sentryUnpluginFactory({ plugins.push(moduleMetadataInjectionPlugin(injectionCode)); } - if (options.sourcemaps?.disable) { - logger.debug("Source map upload was disabled. Will not upload sourcemaps."); - } else if (!options.release.name) { + if (!options.release.name) { logger.warn( "No release name provided. Will not create release. Please set the `release.name` option to identify your release." ); @@ -355,7 +353,11 @@ export function sentryUnpluginFactory({ plugins.push(debugIdInjectionPlugin(logger)); - if (!options.authToken) { + if (options.sourcemaps?.disable) { + logger.debug( + "Source map upload was disabled. Will not upload sourcemaps using debug ID process." + ); + } else if (!options.authToken) { logger.warn( "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/" );