File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,7 +15,10 @@ export function createDebugIdUploadFunction({
1515 sentryBuildPluginManager,
1616} : DebugIdUploadPluginOptions ) {
1717 return async ( buildArtifactPaths : string [ ] ) => {
18- await sentryBuildPluginManager . uploadSourcemaps ( buildArtifactPaths ) ;
18+ // Webpack and perhaps other bundlers allow you to append query strings to
19+ // filenames for cache busting purposes. We should strip these before upload.
20+ const cleanedPaths = buildArtifactPaths . map ( ( p ) => p . split ( "?" ) [ 0 ] || p ) ;
21+ await sentryBuildPluginManager . uploadSourcemaps ( cleanedPaths ) ;
1922 } ;
2023}
2124
Original file line number Diff line number Diff line change @@ -77,6 +77,7 @@ export function createCjsBundles(
7777 output : {
7878 path : path . join ( outFolder , "webpack4" ) ,
7979 libraryTarget : "commonjs" ,
80+ filename : "[name].js?[contenthash]" ,
8081 } ,
8182 target : "node" , // needed for webpack 4 so we can access node api
8283 plugins : [ sentryWebpackPlugin ( sentryUnpluginOptions ) ] ,
You can’t perform that action at this time.
0 commit comments