File tree Expand file tree Collapse file tree 2 files changed +18
-3
lines changed
Expand file tree Collapse file tree 2 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,10 @@ interface SentryUnpluginFactoryOptions {
3333 componentNameAnnotatePlugin ?: ( ignoredComponents ?: string [ ] ) => UnpluginOptions ;
3434 moduleMetadataInjectionPlugin : ( injectionCode : string ) => UnpluginOptions ;
3535 debugIdInjectionPlugin : ( logger : Logger ) => UnpluginOptions ;
36- debugIdUploadPlugin : ( upload : ( buildArtifacts : string [ ] ) => Promise < void > ) => UnpluginOptions ;
36+ debugIdUploadPlugin : (
37+ upload : ( buildArtifacts : string [ ] ) => Promise < void > ,
38+ logger : Logger
39+ ) => UnpluginOptions ;
3740 bundleSizeOptimizationsPlugin : ( buildFlags : SentrySDKBuildFlags ) => UnpluginOptions ;
3841}
3942
@@ -408,7 +411,8 @@ export function sentryUnpluginFactory({
408411 vcsRemote : options . release . vcsRemote ,
409412 headers : options . headers ,
410413 } ,
411- } )
414+ } ) ,
415+ logger
412416 )
413417 ) ;
414418 }
Original file line number Diff line number Diff line change 55 stringToUUID ,
66 SentrySDKBuildFlags ,
77 createComponentNameAnnotateHooks ,
8+ Logger ,
89} from "@sentry/bundler-plugin-core" ;
910import * as path from "path" ;
1011import { UnpluginOptions } from "unplugin" ;
@@ -117,7 +118,8 @@ function webpackDebugIdInjectionPlugin(): UnpluginOptions {
117118}
118119
119120function webpackDebugIdUploadPlugin (
120- upload : ( buildArtifacts : string [ ] ) => Promise < void >
121+ upload : ( buildArtifacts : string [ ] ) => Promise < void > ,
122+ logger : Logger
121123) : UnpluginOptions {
122124 const pluginName = "sentry-webpack-debug-id-upload-plugin" ;
123125 return {
@@ -133,6 +135,15 @@ function webpackDebugIdUploadPlugin(
133135 callback ( ) ;
134136 } ) ;
135137 } ) ;
138+
139+ if ( compiler . options . mode === "production" ) {
140+ compiler . hooks . done . tap ( pluginName , ( ) => {
141+ setTimeout ( ( ) => {
142+ logger . debug ( "Exiting process after debug file upload" ) ;
143+ process . exit ( 0 ) ;
144+ } ) ;
145+ } ) ;
146+ }
136147 } ,
137148 } ;
138149}
You can’t perform that action at this time.
0 commit comments