Skip to content

Add Remix 3 browser SDK with a bundled client entry #24665

Description

@chargome

Add the browser side, built on @sentry/browser. There is no React in Remix 3, so nothing from @sentry/react applies.

  • Init plus pageload and navigation tracing driven by the Navigation API. Remix 3 never touches History, so the default browser tracing integration would emit nothing.
  • Capture component render errors from the event target run() returns. The runtime does not rethrow them, so window.onerror cannot see them.
  • Ship the diagnostics_channel shim as its own module. It has to stay a separate file because the browser code transform imports it by URL.
  • Export a curated named list instead of export * from '@sentry/browser', and bundle the client entry into a single tree shaken file.
  • Add the size limit budget in the same pull request.

Remix 3 has no bundler, so an unbundled client costs 255 modules and 364 KB gzipped. Bundled it is 2 modules and about 53 KB, against a 54 KB budget for the equivalent browser SDK. The wildcard re-export is what makes tree shaking impossible, and anyone adding one back silently returns us to 364 KB. The budget is the only thing that catches that, which is why it cannot wait for a later pull request.

Done when pageload, navigation and client error e2e tests pass, and the size limit budget is enforced in CI.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions