Skip to content

chore: Remove lazy loading for hook registration#22443

Draft
timfish wants to merge 6 commits into
developfrom
timfish/chore/cleanup-hook-register
Draft

chore: Remove lazy loading for hook registration#22443
timfish wants to merge 6 commits into
developfrom
timfish/chore/cleanup-hook-register

Conversation

@timfish

@timfish timfish commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

This PR:

  • Fixes a build time Rollup ESM interop issue
  • Makes @sentry/server-utils external for NextJs so that register.ts can always resolve the hook because it's running in node_modules
    • Removes passing around of tracingHooksPath from previous workaround
  • Bumps the @sentry/node size limit by ~80kb. The obfuscation stopped this being bundled and reported in the total size before!

The remaining failures are down to:

@github-actions

github-actions Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 27.76 kB - -
@sentry/browser - with treeshaking flags 26.2 kB - -
@sentry/browser (incl. Tracing) 46.59 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 48.4 kB - -
@sentry/browser (incl. Tracing, Profiling) 51.39 kB - -
@sentry/browser (incl. Tracing, Replay) 85.83 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 75.47 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 90.56 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 103.22 kB - -
@sentry/browser (incl. Feedback) 44.95 kB - -
@sentry/browser (incl. sendFeedback) 32.56 kB - -
@sentry/browser (incl. FeedbackAsync) 37.69 kB - -
@sentry/browser (incl. Metrics) 28.84 kB - -
@sentry/browser (incl. Logs) 29.06 kB - -
@sentry/browser (incl. Metrics & Logs) 29.76 kB - -
@sentry/react 29.55 kB - -
@sentry/react (incl. Tracing) 48.87 kB - -
@sentry/vue 33.18 kB - -
@sentry/vue (incl. Tracing) 48.56 kB - -
@sentry/svelte 27.78 kB - -
CDN Bundle 30.16 kB - -
CDN Bundle (incl. Tracing) 48.56 kB - -
CDN Bundle (incl. Logs, Metrics) 31.74 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 49.86 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 71 kB - -
CDN Bundle (incl. Tracing, Replay) 86.06 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 87.38 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 91.87 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 93.13 kB - -
CDN Bundle - uncompressed 89.89 kB - -
CDN Bundle (incl. Tracing) - uncompressed 146.77 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 94.6 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 150.75 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 219.36 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 266.01 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 269.97 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 279.71 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 283.66 kB - -
@sentry/nextjs (client) 51.38 kB - -
@sentry/sveltekit (client) 47 kB - -
@sentry/core/server 80.3 kB - -
@sentry/core/browser 66.71 kB - -
@sentry/node-core 63.21 kB - -
@sentry/node 125.04 kB - -
@sentry/node (incl. diagnostics channel injection) 220.63 kB +46.59% +70.12 kB 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 70.03 kB - -
@sentry/node/light 51.33 kB -0.01% -1 B 🔽
@sentry/node - without tracing 74.91 kB -0.01% -1 B 🔽
@sentry/aws-serverless 84.16 kB - -
@sentry/cloudflare (withSentry) - minified 197.75 kB - -
@sentry/cloudflare (withSentry) 486.73 kB - -

View base workflow run

@timfish timfish changed the title chore: Cleanup hook registration chore: Remove lazy loading for hook registration Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant