Skip to content

Commit 71a281b

Browse files
committed
increase boundary to 6000 chars
1 parent 31d27c4 commit 71a281b

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ export function createRollupDebugIdInjectionHooks(): {
270270
)
271271
) {
272272
// Check if a debug ID has already been injected to avoid duplicate injection (e.g. by another plugin or Sentry CLI)
273-
const chunkStartSnippet = code.slice(0, 2000);
273+
const chunkStartSnippet = code.slice(0, 6000);
274274
const chunkEndSnippet = code.slice(-500);
275275

276276
if (

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,12 @@ describe("createRollupDebugIdInjectionHooks", () => {
8484
});
8585

8686
it("should only check boundaries for performance (not entire file)", () => {
87-
// Inline format beyond first 2KB boundary
88-
const codeWithInlineBeyond2KB =
89-
"a".repeat(2100) +
87+
// Inline format beyond first 6KB boundary
88+
const codeWithInlineBeyond6KB =
89+
"a".repeat(6100) +
9090
';{try{(function(){var e="undefined"!=typeof window?window:e._sentryDebugIdIdentifier="sentry-dbid-existing-id");})();}catch(e){}};';
9191

92-
expect(hooks.renderChunk(codeWithInlineBeyond2KB, { fileName: "bundle.js" })).not.toBeNull();
92+
expect(hooks.renderChunk(codeWithInlineBeyond6KB, { fileName: "bundle.js" })).not.toBeNull();
9393

9494
// Comment format beyond last 500 bytes boundary
9595
const codeWithCommentBeyond500B =

0 commit comments

Comments
 (0)