Commit 9625114
committed
feat(core): split exports by browser/server for bundle size
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 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/core` where they can be easily
shared across runtimes.
Requires updating our `tsconfig` settings so that tsc knows it is
allowed to look on `package.json` exports. This then, requires setting
some other packages to `"moduleResolution": "bundler"` and `"module":
"esnext"` in order to continue working as before. In the case of
sveltekit, some types appear to just not be exported in a
node16-compatible way, meaning that we now need to read them from the
exported function rather than dive into the package contents.
fix: #20434
fix: JS-22431 parent 8ad3dd0 commit 9625114
566 files changed
Lines changed: 1712 additions & 1526 deletions
File tree
- dev-packages/test-utils
- packages
- angular
- src
- test
- astro
- src
- client
- server
- browser-utils
- src
- instrument
- metrics
- test
- browser
- instrument
- metrics
- utils
- browser
- src
- integrations-bundle
- integrations
- featureFlags
- growthbook
- launchdarkly
- openfeature
- statsig
- unleash
- pluggable-exports-bundle
- profiling
- tracing
- transports
- utils
- test
- helper
- integrations
- mocks
- profiling
- tracekit
- tracing
- transports
- bun
- src
- integrations
- transports
- test
- integrations
- cloudflare
- src
- instrumentations
- worker
- integrations
- tracing
- opentelemetry
- utils
- vendor
- test
- instrumentations
- worker
- integrations
- utils
- core
- src
- integrations/http
- deno
- src
- integrations
- tracing
- opentelemetry
- transports
- utils
- test
- elysia
- src
- test
- feedback
- src
- constants
- core
- modal
- components
- screenshot
- components
- util
- test/core
- gatsby/src
- google-cloud-serverless
- src
- gcpfunction
- integrations
- test
- gcpfunction
- integrations
- hono
- src
- bun
- cloudflare
- node
- test
- bun
- cloudflare
- node
- node-core
- src
- cron
- integrations
- anr
- http
- local-variables
- node-fetch
- light
- integrations
- logs
- otel
- proxy
- sdk
- transports
- utils
- test
- helpers
- integrations
- integration
- logs
- sdk
- transports
- utils
- node-native
- src
- node
- src
- integrations
- featureFlagShims
- tracing
- anthropic-ai
- fastify
- v3
- firebase
- otel
- patches
- google-genai
- hapi
- hono
- langchain
- langgraph
- openai
- vercelai
- sdk
- test
- helpers
- integrations/tracing/vercelai
- integration
- sdk
- opentelemetry
- src
- custom
- utils
- test
- helpers
- integration
- utils
- profiling-node
- src
- test
- react-router
- react
- src
- reactrouter-compat-utils
- test
- reactrouter-compat-utils
- remix
- replay-canvas
- src
- replay-worker
- solidstart
- solid
- sveltekit
- src
- server-common
- vite
- svelte/src
- tanstackstart-react
- typescript
- vercel-edge
- src
- integrations
- tracing
- logs
- transports
- vendored
- test
- transports
- vue
- src
- test
- integration
- wasm/src
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
| 6 | + | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
| 23 | + | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
1 | 7 | | |
| 8 | + | |
2 | 9 | | |
3 | 10 | | |
4 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
| 3 | + | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
0 commit comments