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 {
33
33
componentNameAnnotatePlugin ?: ( ignoredComponents ?: string [ ] ) => UnpluginOptions ;
34
34
moduleMetadataInjectionPlugin : ( injectionCode : string ) => UnpluginOptions ;
35
35
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 ;
37
40
bundleSizeOptimizationsPlugin : ( buildFlags : SentrySDKBuildFlags ) => UnpluginOptions ;
38
41
}
39
42
@@ -408,7 +411,8 @@ export function sentryUnpluginFactory({
408
411
vcsRemote : options . release . vcsRemote ,
409
412
headers : options . headers ,
410
413
} ,
411
- } )
414
+ } ) ,
415
+ logger
412
416
)
413
417
) ;
414
418
}
Original file line number Diff line number Diff line change 5
5
stringToUUID ,
6
6
SentrySDKBuildFlags ,
7
7
createComponentNameAnnotateHooks ,
8
+ Logger ,
8
9
} from "@sentry/bundler-plugin-core" ;
9
10
import * as path from "path" ;
10
11
import { UnpluginOptions } from "unplugin" ;
@@ -117,7 +118,8 @@ function webpackDebugIdInjectionPlugin(): UnpluginOptions {
117
118
}
118
119
119
120
function webpackDebugIdUploadPlugin (
120
- upload : ( buildArtifacts : string [ ] ) => Promise < void >
121
+ upload : ( buildArtifacts : string [ ] ) => Promise < void > ,
122
+ logger : Logger
121
123
) : UnpluginOptions {
122
124
const pluginName = "sentry-webpack-debug-id-upload-plugin" ;
123
125
return {
@@ -133,6 +135,15 @@ function webpackDebugIdUploadPlugin(
133
135
callback ( ) ;
134
136
} ) ;
135
137
} ) ;
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
+ }
136
147
} ,
137
148
} ;
138
149
}
You can’t perform that action at this time.
0 commit comments