Skip to content

Commit 21aec56

Browse files
committed
PR review
1 parent 1cf484a commit 21aec56

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

packages/bundler-plugin-core/src/debug-id-upload.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { promisify } from "util";
66
import { SentryBuildPluginManager } from "./build-plugin-manager";
77
import { Logger } from "./logger";
88
import { ResolveSourceMapHook, RewriteSourcesHook } from "./types";
9+
import { stripQueryAndHashFromPath } from "./utils";
910

1011
interface DebugIdUploadPluginOptions {
1112
sentryBuildPluginManager: SentryBuildPluginManager;
@@ -17,7 +18,7 @@ export function createDebugIdUploadFunction({
1718
return async (buildArtifactPaths: string[]) => {
1819
// Webpack and perhaps other bundlers allow you to append query strings to
1920
// filenames for cache busting purposes. We should strip these before upload.
20-
const cleanedPaths = buildArtifactPaths.map((p) => p.split("?")[0] || p);
21+
const cleanedPaths = buildArtifactPaths.map(stripQueryAndHashFromPath);
2122
await sentryBuildPluginManager.uploadSourcemaps(cleanedPaths);
2223
};
2324
}

0 commit comments

Comments
 (0)