File tree Expand file tree Collapse file tree
packages/webpack-plugin/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -277,11 +277,11 @@ export function sentryWebpackPluginFactory({
277277
278278 compiler . hooks . afterEmit . tapAsync (
279279 "sentry-webpack-plugin" ,
280- ( compilation : WebpackCompilation , callback : ( ) => void ) => {
280+ ( compilation : WebpackCompilation , callback : ( err ?: Error ) => void ) => {
281281 const freeGlobalDependencyOnBuildArtifacts = createDependencyOnBuildArtifacts ( ) ;
282282 const upload = createDebugIdUploadFunction ( { sentryBuildPluginManager } ) ;
283283
284- void sentryBuildPluginManager
284+ sentryBuildPluginManager
285285 . createRelease ( )
286286 . then ( async ( ) => {
287287 if ( sourcemapsEnabled && options . sourcemaps ?. disable !== "disable-upload" ) {
@@ -292,13 +292,14 @@ export function sentryWebpackPluginFactory({
292292 await upload ( buildArtifacts ) ;
293293 }
294294 } )
295- . then ( ( ) => {
296- callback ( ) ;
297- } )
298- . finally ( ( ) => {
295+ . finally ( async ( ) => {
299296 freeGlobalDependencyOnBuildArtifacts ( ) ;
300- void sentryBuildPluginManager . deleteArtifacts ( ) ;
301- } ) ;
297+ await sentryBuildPluginManager . deleteArtifacts ( ) ;
298+ } )
299+ . then (
300+ ( ) => callback ( ) ,
301+ ( err : Error ) => callback ( err )
302+ ) ;
302303 }
303304 ) ;
304305
You can’t perform that action at this time.
0 commit comments