Skip to content

Commit 590fecd

Browse files
author
Luca Forstner
authored
ref: Make asset detection more robust (#369)
1 parent fb69aab commit 590fecd

File tree

1 file changed

+6
-1
lines changed
  • packages/bundler-plugin-core/src

1 file changed

+6
-1
lines changed

packages/bundler-plugin-core/src/index.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import {
2020
stripQueryAndHashFromPath,
2121
} from "./utils";
2222
import * as dotenv from "dotenv";
23+
import { glob } from "glob";
2324

2425
interface SentryUnpluginFactoryOptions {
2526
releaseInjectionPlugin: (injectionCode: string) => UnpluginOptions;
@@ -420,7 +421,11 @@ export function createRollupDebugIdUploadHooks(
420421
) {
421422
if (outputOptions.dir) {
422423
const outputDir = outputOptions.dir;
423-
const buildArtifacts = Object.keys(bundle).map((asset) => path.join(outputDir, asset));
424+
const buildArtifacts = await glob(["/**/*.js", "/**/*.js.map"], {
425+
root: outputDir,
426+
absolute: true,
427+
nodir: true,
428+
});
424429
await upload(buildArtifacts);
425430
} else if (outputOptions.file) {
426431
await upload([outputOptions.file]);

0 commit comments

Comments
 (0)