René's URL Explorer Experiment


Title: feat(bundle): Reduce browser CDN bundle size by ~2.3% (-644 bytes gzipped) · Issue #19834 · getsentry/sentry-javascript · GitHub

Open Graph Title: feat(bundle): Reduce browser CDN bundle size by ~2.3% (-644 bytes gzipped) · Issue #19834 · getsentry/sentry-javascript

X Title: feat(bundle): Reduce browser CDN bundle size by ~2.3% (-644 bytes gzipped) · Issue #19834 · getsentry/sentry-javascript

Description: NoteThe pull request "feat(bundle): Reduce browser CDN bundle size by ~2.3% (-644 bytes gzipped)" was created by @HazAT but did not reference an issue. Therefore this issue was created for better visibility in external tools like Linear....

Open Graph Description: NoteThe pull request "feat(bundle): Reduce browser CDN bundle size by ~2.3% (-644 bytes gzipped)" was created by @HazAT but did not reference an issue. Therefore this issue was created for better v...

X Description: NoteThe pull request "feat(bundle): Reduce browser CDN bundle size by ~2.3% (-644 bytes gzipped)" was created by @HazAT but did not reference an issue. Therefore this issue was created fo...

Mail addresses
claude@anthropic.com

Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/19834

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.113.3


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"feat(bundle): Reduce browser CDN bundle size by ~2.3% (-644 bytes gzipped)","articleBody":"> [!NOTE]\n> The pull request \"[feat(bundle): Reduce browser CDN bundle size by ~2.3% (-644 bytes gzipped)](https://github.com/getsentry/sentry-javascript/pull/19833)\" was created by @HazAT but did not reference an issue. Therefore this issue was created for better visibility in external tools like Linear.\n\n## Summary\n\nReduces the base browser CDN bundle (`bundle.min.js`) gzipped size by **~2.3%** (27.85 kB → 27.22 kB, saving **644 bytes** gzipped / **3.4 KB** raw).\n\nThese are safe, behavior-preserving changes found through systematic experimentation across 50 iterations. No public API changes, no removed functionality.\n\n## Changes by category\n\n### Terser minifier configuration (`dev-packages/rollup-utils`)\n\nThe existing terser config used defaults for compression. Enabling additional safe options yields ~300 bytes gzipped:\n\n- **`compress.passes: 5`** — multi-pass optimization finds more dead code\n- **`compress.ecma: 2020`** — allows modern syntax in output (nullish coalescing, optional chaining)\n- **`compress.toplevel: true`** — better variable inlining within the IIFE\n- **`compress.unsafe_arrows: true`** — converts `function` to `=>` where `this` is unused (~1.3 KB raw)\n- **`compress.unsafe_methods: true`** — converts `{ m: function(){} }` to `{ m(){} }`\n- **`compress.unsafe_comps / unsafe_math / pure_getters`** — safe algebraic optimizations\n- **`mangle.toplevel: true`** — mangle top-level variable names within the IIFE scope\n\n### Remove redundant iframe-based native fetch check (`packages/core/src/utils/supports.ts`)\n\n`supportsNativeFetch()` created a sandboxed iframe to check if `fetch` is natively implemented — identical logic to `getNativeImplementation(\"fetch\")` in `browser-utils`. The function is only called behind a `skipNativeFetchCheck` guard that is never `true` in the base CDN bundle, making the iframe code dead weight. Simplified to delegate to `_isFetchSupported()`. **Saves ~200 bytes gzipped.**\n\n### Slim envelope type-to-category map (`packages/core/src/utils/envelope.ts`)\n\nThe `ITEM_TYPE_TO_DATA_CATEGORY_MAP` had 18 entries, 7 of which mapped a type to itself (e.g. `session: \"session\"`). Replaced with an 11-entry overrides map that falls back to the type name itself. **Saves ~38 bytes gzipped.**\n\n### Shorten default ignore-error patterns (`packages/core/src/integrations/eventFilters.ts`)\n\nConverted verbose string literals in `DEFAULT_IGNORE_ERRORS` to shorter regex patterns with the same matching behavior:\n- `\"vv().getRestrictions is not a function. (In 'vv()...\"` → `/vv\\(\\)\\.getRestrictions is not a function/`\n- `\"Can't find variable: _AutofillCallbackHandler\"` → regex equivalent\n- Long CEFSharp `simulateEvent` pattern → shorter partial match\n\n**Saves ~38 bytes gzipped.**\n\n### Derive lazy-load integration bundle names (`packages/browser/src/utils/lazyLoadIntegration.ts`)\n\nThe `LazyLoadableIntegrations` object stored 21 key-value pairs where values were mostly derivable from keys (strip `\"Integration\"`, lowercase). Replaced with an array of names + a derivation function, with a 3-entry exceptions map for hyphenated bundle names. Also uses `string.split(\",\")` for the array. **Saves ~30 bytes gzipped.**\n\n### Consolidate `sendSession` logic (`packages/core/src/client.ts`)\n\n`sendSession()` had duplicate code blocks for session aggregates vs individual sessions, both checking and backfilling `release` and `environment`. Unified into a single code path. **Saves ~16 bytes gzipped.**\n\n### Use `URLSearchParams` in `getReportDialogEndpoint` (`packages/core/src/api.ts`)\n\nReplaced manual `encodeURIComponent` string concatenation with `URLSearchParams`, which is more concise and already used elsewhere in the same file. **Saves ~26 bytes gzipped.**\n\n### Inline Vue ViewModel checks (`packages/core/src/utils/normalize.ts`, `string.ts`)\n\n`isVueViewModel()` and `getVueInternalName()` were standalone exported functions only called from two sites (normalize and safeJoin). Inlined the checks directly, allowing tree-shaking to eliminate the standalone functions. **Saves ~15 bytes gzipped.**\n\n### Rename internal `sentryWrapped` → `sW` (`packages/browser/src/helpers.ts`, `packages/core/src/utils/stacktrace.ts`)\n\nThe `sentryWrapped` function name in the `wrap()` helper is reserved from mangling because it is matched by a regex in `stripSentryFramesAndReverse()` for internal frame stripping. Shortened to `sW` and updated the regex to match both names for backwards compatibility. **Saves ~10 bytes gzipped.**\n\n### Smaller cleanups\n\n- **`DEFAULT_EVENT_TARGET`** array → comma-separated `string.split(\",\")` (51 bytes raw)\n- **`getErrorPropertyFromObject`** — `Object.values().find()` instead of `for...in` loop\n- **`getOwnProperties`** — `Object.fromEntries(Object.entries())` instead of manual loop\n- **`isNativeFunction`** — simplified regex from exact whitespace match to `/\\[native code\\]/`\n- **Browser extension detection** — regex test instead of `array.some()` with `startsWith`\n- **`_enhanceEventWithInitialFrame`** — removed redundant intermediate variable aliases\n- **`baggage.ts`** — `.startsWith()` instead of `.match()` for prefix check\n- **Unused `breadcrumbData`** variable removed from fetch breadcrumb handler\n\n## What was NOT changed\n\n- No public API signatures were modified\n- No functionality was removed\n- No new dependencies were added\n- All changes are in source code or build config — no test modifications\n- The `unsafe_*` terser options only apply to CDN `.min.js` bundles (not npm ESM/CJS output)\n\nCo-Authored-By: Claude claude@anthropic.com\n","author":{"url":"https://github.com/apps/github-actions","@type":"Person","name":"github-actions"},"datePublished":"2026-03-17T11:36:49Z","url":"https://github.com/getsentry/sentry-javascript/issues/19834"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:81c4e691-ae3c-8a22-8173-8e134d9f79ee
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idBB5A:205334:473247:647E63:6B047071
html-safe-nonceb7239cf3f8bde8461c905dc0ddac46b940954aa779fe72f70d0941d18026d7ca
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQjVBOjIwNTMzNDo0NzMyNDc6NjQ3RTYzOjZCMDQ3MDcxIiwidmlzaXRvcl9pZCI6IjYzNjExMTY2OTM4MjM3NzU4NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacdb2bff2ea1f7a8e600ab99440e53126b0a40cca1838d7078c3fbbe9d0f780998
hovercard-subject-tagissue:4087984043
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/19834/issue_layout
twitter:imagehttps://opengraph.githubassets.com/b3f537bdef40eb57bf9a17e20746400ec32d117be66e8776240ff2fb5463d053/getsentry/sentry-javascript/issues/19834
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/b3f537bdef40eb57bf9a17e20746400ec32d117be66e8776240ff2fb5463d053/getsentry/sentry-javascript/issues/19834
og:image:altNoteThe pull request "feat(bundle): Reduce browser CDN bundle size by ~2.3% (-644 bytes gzipped)" was created by @HazAT but did not reference an issue. Therefore this issue was created for better v...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamegithub-actions[bot]
hostnamegithub.com
expected-hostnamegithub.com
Noneae8802492f12d3ba4f6b0d814054e617a2a5616b6327bf8555c10cd5b0dc2a6f
turbo-cache-controlno-preview
go-importgithub.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git
octolytics-dimension-user_id1396951
octolytics-dimension-user_logingetsentry
octolytics-dimension-repository_id3328572
octolytics-dimension-repository_nwogetsentry/sentry-javascript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id3328572
octolytics-dimension-repository_network_root_nwogetsentry/sentry-javascript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasecfb5f24c6e01d85f70804652a5107e5cac03a161
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/getsentry/sentry-javascript/issues/19834#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-javascript%2Fissues%2F19834
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-javascript%2Fissues%2F19834
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=getsentry%2Fsentry-javascript
Reloadhttps://github.com/getsentry/sentry-javascript/issues/19834
Reloadhttps://github.com/getsentry/sentry-javascript/issues/19834
Reloadhttps://github.com/getsentry/sentry-javascript/issues/19834
getsentryhttps://github.com/getsentry
sentry-javascripthttps://github.com/getsentry/sentry-javascript
Codehttps://github.com/getsentry/sentry-javascript
Issues339 (339)https://github.com/getsentry/sentry-javascript/issues
Pull requests55 (55)https://github.com/getsentry/sentry-javascript/pulls
Discussionshttps://github.com/getsentry/sentry-javascript/discussions
Actionshttps://github.com/getsentry/sentry-javascript/actions
Security and quality7 (7)https://github.com/getsentry/sentry-javascript/security
Insightshttps://github.com/getsentry/sentry-javascript/insights
https://github.com/getsentry/sentry-javascript
New issuehttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/19834
New issuehttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/19834
feat(bundle): Reduce browser CDN bundle size by ~2.3% (-644 bytes gzipped)https://github.com/getsentry/sentry-javascript/issues/19834#top
https://github.com/HazAT
https://github.com/Lms24
Improvementhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Improvement%22
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
on Mar 17, 2026https://github.com/getsentry/sentry-javascript/issues/19834#issue-4087984043
feat(bundle): Reduce browser CDN bundle size by ~2.3% (-644 bytes gzipped)https://github.com/getsentry/sentry-javascript/pull/19833
@HazAThttps://github.com/HazAT
github-actionshttps://github.com/apps/github-actions
HazAThttps://github.com/HazAT
on Mar 17, 2026https://github.com/getsentry/sentry-javascript/issues/19834#event-23640605298
https://github.com/apps/linear-code
linear-codehttps://github.com/apps/linear-code
on Mar 17, 2026https://github.com/getsentry/sentry-javascript/issues/19834#issuecomment-4074331080
Linear Codehttps://linear.app
JS-1949https://linear.app/getsentry/issue/JS-1949/featbundle-reduce-browser-cdn-bundle-size-by-23percent-644-bytes
Lms24https://github.com/Lms24
on Mar 18, 2026https://github.com/getsentry/sentry-javascript/issues/19834#event-23681772745
stephanie-andersonhttps://github.com/stephanie-anderson
Improvementhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Improvement%22
on Mar 24, 2026https://github.com/getsentry/sentry-javascript/issues/19834#event-23841065988
https://github.com/Lms24
Lms24https://github.com/Lms24
on Apr 9, 2026https://github.com/getsentry/sentry-javascript/issues/19834#issuecomment-4214599836
Lms24https://github.com/Lms24
completedhttps://github.com/getsentry/sentry-javascript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Apr 9, 2026https://github.com/getsentry/sentry-javascript/issues/19834#event-24337369859
Sign up for freehttps://github.com/signup?return_to=https://github.com/getsentry/sentry-javascript/issues/19834
Sign in to commenthttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/19834
HazAThttps://github.com/HazAT
Lms24https://github.com/Lms24
Improvementhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Improvement%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.