Skip to content

Commit

Permalink
fix: Use sourcemaps.disable to disable debug ID upload instead of l…
Browse files Browse the repository at this point in the history
…egacy upload
  • Loading branch information
lforst committed Aug 12, 2024
1 parent 28bf630 commit 00f6b8e
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions packages/bundler-plugin-core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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."
);
Expand Down Expand Up @@ -353,9 +351,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/"
);
Expand All @@ -369,6 +369,7 @@ export function sentryUnpluginFactory({
);
} else {
plugins.push(
debugIdInjectionPlugin(logger),
debugIdUploadPlugin(
createDebugIdUploadFunction({
assets: options.sourcemaps?.assets,
Expand Down

0 comments on commit 00f6b8e

Please sign in to comment.