Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 18 additions & 16 deletions packages/bundler-plugin-core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,22 +126,24 @@ export function sentryUnpluginFactory({
if (!options.sourcemaps?.disable) {
plugins.push(debugIdInjectionPlugin(logger));

// This option is only strongly typed for the webpack plugin, where it is used. It has no effect on other plugins
const webpack_forceExitOnBuildComplete =
typeof options._experiments["forceExitOnBuildCompletion"] === "boolean"
? options._experiments["forceExitOnBuildCompletion"]
: undefined;

plugins.push(
debugIdUploadPlugin(
createDebugIdUploadFunction({
sentryBuildPluginManager,
}),
logger,
sentryBuildPluginManager.createDependencyOnBuildArtifacts,
webpack_forceExitOnBuildComplete
)
);
if (options.sourcemaps?.disable !== "disable-upload") {
// This option is only strongly typed for the webpack plugin, where it is used. It has no effect on other plugins
const webpack_forceExitOnBuildComplete =
typeof options._experiments["forceExitOnBuildCompletion"] === "boolean"
? options._experiments["forceExitOnBuildCompletion"]
: undefined;

plugins.push(
debugIdUploadPlugin(
createDebugIdUploadFunction({
sentryBuildPluginManager,
}),
logger,
sentryBuildPluginManager.createDependencyOnBuildArtifacts,
webpack_forceExitOnBuildComplete
)
);
}
}

if (options.reactComponentAnnotation) {
Expand Down
2 changes: 1 addition & 1 deletion packages/bundler-plugin-core/src/options-mapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export type NormalizedOptions = {
disable: boolean;
sourcemaps:
| {
disable?: boolean;
disable?: boolean | "disable-upload";
assets?: string | string[];
ignore?: string | string[];
rewriteSources?: RewriteSourcesHook;
Expand Down
2 changes: 1 addition & 1 deletion packages/bundler-plugin-core/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export interface Options {
*
* Defaults to `false`.
*/
disable?: boolean;
disable?: boolean | "disable-upload";

/**
* A glob or an array of globs that specifies the build artifacts that should be uploaded to Sentry.
Expand Down
Loading