You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(core): split exports by browser/server for bundle size (#20435)
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
0 commit comments