feat(core): split exports by browser/server for bundle size#20435
Open
feat(core): split exports by browser/server for bundle size#20435
Conversation
143a2a5 to
1494709
Compare
Contributor
size-limit report 📦
|
d5dddbf to
8eba1e9
Compare
8eba1e9 to
8ea4f5c
Compare
8ea4f5c to
787f44b
Compare
isaacs
added a commit
that referenced
this pull request
Apr 22, 2026
Split the exports from `@sentry/core` into three options: - `@sentry/core`, the default (unchanged) - `@sentry/core/browser`, containing _only_ shared and browser-specific functionality, nothing server-specific. - `@sentry/core/server`, containing _only_ shared and server-specific functionality, nothing browser-specific. This should allow us to make the bundle sizes quite a bit smaller in our browser SDKs where this is important, while adding more functionality to our server-specific SDKs, in `@sentry/core` where they can be easily shared across runtimes. Integration may require updating our `tsconfig` settings so that tsc knows it is allowed to look on `package.json` exports. fix: #20434 fix: JS-2243
787f44b to
7076f7c
Compare
isaacs
added a commit
that referenced
this pull request
Apr 23, 2026
Split the exports from `@sentry/core` into three options: - `@sentry/core`, the default (unchanged) - `@sentry/core/browser`, containing _only_ shared and browser-specific functionality, nothing server-specific. - `@sentry/core/server`, containing _only_ shared and server-specific functionality, nothing browser-specific. This should allow us to make the bundle sizes quite a bit smaller in our browser SDKs where this is important, while adding more functionality to our server-specific SDKs, in `@sentry/core` where they can be easily shared across runtimes. Integration may require updating our `tsconfig` settings so that tsc knows it is allowed to look on `package.json` exports. fix: #20434 fix: JS-2243
7076f7c to
e2cf052
Compare
isaacs
added a commit
that referenced
this pull request
Apr 23, 2026
Split the exports from `@sentry/core` into three options: - `@sentry/core`, the default (unchanged) - `@sentry/core/browser`, containing _only_ shared and browser-specific functionality, nothing server-specific. - `@sentry/core/server`, containing _only_ shared and server-specific functionality, nothing browser-specific. This should allow us to make the bundle sizes quite a bit smaller in our browser SDKs where this is important, while adding more functionality to our server-specific SDKs, in `@sentry/core` where they can be easily shared across runtimes. Integration may require updating our `tsconfig` settings so that tsc knows it is allowed to look on `package.json` exports. fix: #20434 fix: JS-2243
e2cf052 to
67bf5c4
Compare
timfish
reviewed
Apr 23, 2026
Collaborator
timfish
left a comment
There was a problem hiding this comment.
I looked through most of the changed files.
I guess this doesn't deprecate the old root exports yet?
mydea
reviewed
Apr 24, 2026
mydea
reviewed
Apr 24, 2026
mydea
reviewed
Apr 24, 2026
mydea
reviewed
Apr 24, 2026
isaacs
added a commit
that referenced
this pull request
Apr 29, 2026
Split the exports from `@sentry/core` into three options: - `@sentry/core`, the default (unchanged) - `@sentry/core/browser`, containing _only_ shared and browser-specific functionality, nothing server-specific. - `@sentry/core/server`, containing _only_ shared and server-specific functionality, nothing browser-specific. This should allow us to make the bundle sizes quite a bit smaller in our browser SDKs where this is important, while adding more functionality to our server-specific SDKs in `@sentry/core`, where they can more easily be shared across runtimes. Some integration requires updating `tsconfig` settings so that tsc knows it is allowed to look up `package.json` exports. fix: #20434 fix: JS-2243
67bf5c4 to
2cf15db
Compare
isaacs
added a commit
that referenced
this pull request
Apr 29, 2026
Split the exports from `@sentry/core` into three options: - `@sentry/core`, the default (unchanged) - `@sentry/core/browser`, containing _only_ shared and browser-specific functionality, nothing server-specific. - `@sentry/core/server`, containing _only_ shared and server-specific functionality, nothing browser-specific. This should allow us to make the bundle sizes quite a bit smaller in our browser SDKs where this is important, while adding more functionality to our server-specific SDKs in `@sentry/core`, where they can more easily be shared across runtimes. Some integration requires updating `tsconfig` settings so that tsc knows it is allowed to look up `package.json` exports. fix: #20434 fix: JS-2243
2cf15db to
c1c9cf0
Compare
isaacs
added a commit
that referenced
this pull request
Apr 29, 2026
Split the exports from `@sentry/core` into three options: - `@sentry/core`, the default (unchanged) - `@sentry/core/browser`, containing _only_ shared and browser-specific functionality, nothing server-specific. - `@sentry/core/server`, containing _only_ shared and server-specific functionality, nothing browser-specific. This should allow us to make the bundle sizes quite a bit smaller in our browser SDKs where this is important, while adding more functionality to our server-specific SDKs in `@sentry/core`, where they can more easily be shared across runtimes. Some integration requires updating `tsconfig` settings so that tsc knows it is allowed to look up `package.json` exports. fix: #20434 fix: JS-2243
c1c9cf0 to
5beb2e3
Compare
isaacs
added a commit
that referenced
this pull request
Apr 29, 2026
Split the exports from `@sentry/core` into three options: - `@sentry/core`, the default (unchanged) - `@sentry/core/browser`, containing _only_ shared and browser-specific functionality, nothing server-specific. - `@sentry/core/server`, containing _only_ shared and server-specific functionality, nothing browser-specific. This should allow us to make the bundle sizes quite a bit smaller in our browser SDKs where this is important, while adding more functionality to our server-specific SDKs in `@sentry/core`, where they can more easily be shared across runtimes. Some integration requires updating `tsconfig` settings so that tsc knows it is allowed to look up `package.json` exports. In particular, we cannot use the `module: "node"` option, or `moduleResolution: "node"`. In many cases, this means either using `module: "esnext"` and `moduleResolution: "bundler"`, so that tsc lets the bundler handle the assembly, or `nodenext` or `node16` for both `module` and `moduleResolution`. fix: #20434 fix: JS-2243
5beb2e3 to
ca38b53
Compare
isaacs
added a commit
that referenced
this pull request
Apr 29, 2026
Split the exports from `@sentry/core` into three options: - `@sentry/core`, the default (unchanged) - `@sentry/core/browser`, containing _only_ shared and browser-specific functionality, nothing server-specific. - `@sentry/core/server`, containing _only_ shared and server-specific functionality, nothing browser-specific. This should allow us to make the bundle sizes quite a bit smaller in our browser SDKs where this is important, while adding more functionality to our server-specific SDKs in `@sentry/core`, where they can more easily be shared across runtimes. Some integration requires updating `tsconfig` settings so that tsc knows it is allowed to look up `package.json` exports. In particular, we cannot use the `module: "node"` option, or `moduleResolution: "node"`. In many cases, this means either using `module: "esnext"` and `moduleResolution: "bundler"`, so that tsc lets the bundler handle the assembly, or `nodenext` or `node16` for both `module` and `moduleResolution`. fix: #20434 fix: JS-2243
ca38b53 to
24304fe
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 24304fe. Configure here.
isaacs
added a commit
that referenced
this pull request
Apr 29, 2026
Split the exports from `@sentry/core` into three options: - `@sentry/core`, the default (unchanged) - `@sentry/core/browser`, containing _only_ shared and browser-specific functionality, nothing server-specific. - `@sentry/core/server`, containing _only_ shared and server-specific functionality, nothing browser-specific. This should allow us to make the bundle sizes quite a bit smaller in our browser SDKs where this is important, while adding more functionality to our server-specific SDKs in `@sentry/core`, where they can more easily be shared across runtimes. Some integration requires updating `tsconfig` settings so that tsc knows it is allowed to look up `package.json` exports. In particular, we cannot use the `module: "node"` option, or `moduleResolution: "node"`. In many cases, this means either using `module: "esnext"` and `moduleResolution: "bundler"`, so that tsc lets the bundler handle the assembly, or `nodenext` or `node16` for both `module` and `moduleResolution`. fix: #20434 fix: JS-2243
24304fe to
da8cd5a
Compare
isaacs
added a commit
that referenced
this pull request
Apr 29, 2026
Split the exports from `@sentry/core` into three options: - `@sentry/core`, the default (unchanged) - `@sentry/core/browser`, containing _only_ shared and browser-specific functionality, nothing server-specific. - `@sentry/core/server`, containing _only_ shared and server-specific functionality, nothing browser-specific. This should allow us to make the bundle sizes quite a bit smaller in our browser SDKs where this is important, while adding more functionality to our server-specific SDKs in `@sentry/core`, where they can more easily be shared across runtimes. Some integration requires updating `tsconfig` settings so that tsc knows it is allowed to look up `package.json` exports. In particular, we cannot use the `module: "node"` option, or `moduleResolution: "node"`. In many cases, this means either using `module: "esnext"` and `moduleResolution: "bundler"`, so that tsc lets the bundler handle the assembly, or `nodenext` or `node16` for both `module` and `moduleResolution`. fix: #20434 fix: JS-2243
da8cd5a to
8fe31cb
Compare
isaacs
added a commit
that referenced
this pull request
Apr 30, 2026
Split the exports from `@sentry/core` into three options: - `@sentry/core`, the default (unchanged) - `@sentry/core/browser`, containing _only_ shared and browser-specific functionality, nothing server-specific. - `@sentry/core/server`, containing _only_ shared and server-specific functionality, nothing browser-specific. This should allow us to make the bundle sizes quite a bit smaller in our browser SDKs where this is important, while adding more functionality to our server-specific SDKs in `@sentry/core`, where they can more easily be shared across runtimes. Some integration requires updating `tsconfig` settings so that tsc knows it is allowed to look up `package.json` exports. In particular, we cannot use the `module: "node"` option, or `moduleResolution: "node"`. In many cases, this means either using `module: "esnext"` and `moduleResolution: "bundler"`, so that tsc lets the bundler handle the assembly, or `nodenext` or `node16` for both `module` and `moduleResolution`. fix: #20434 fix: JS-2243
8fe31cb to
28b47ec
Compare
Split the exports from `@sentry/core` into three options: - `@sentry/core`, the default (unchanged) - `@sentry/core/browser`, containing _only_ shared and browser-specific functionality, nothing server-specific. - `@sentry/core/server`, containing _only_ shared and server-specific functionality, nothing browser-specific. This should allow us to make the bundle sizes quite a bit smaller in our browser SDKs where this is important, while adding more functionality to our server-specific SDKs in `@sentry/core`, where they can more easily be shared across runtimes. Some integration requires updating `tsconfig` settings so that tsc knows it is allowed to look up `package.json` exports. In particular, we cannot use the `module: "node"` option, or `moduleResolution: "node"`. In many cases, this means either using `module: "esnext"` and `moduleResolution: "bundler"`, so that tsc lets the bundler handle the assembly, or `nodenext` or `node16` for both `module` and `moduleResolution`. fix: #20434 fix: JS-2243
28b47ec to
a783c2e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Split the exports from
@sentry/coreinto three options:@sentry/core, the default (unchanged)@sentry/core/browser, containing only shared and browser-specificfunctionality, nothing server-specific.
@sentry/core/server, containing only shared and server-specificfunctionality, nothing browser-specific.
This allows us to make the bundle sizes quite a bit smaller in our
browser SDKs where this is important, while adding more functionality to
our server-specific SDKs, in
@sentry/corewhere they can be easilyshared across runtimes.
fix: #20434
fix: JS-2243