Skip to content

Commit 9f59369

Browse files
Lms24Luca Forstner
authored andcommitted
update tree shaking example after integration export changes
1 parent f895c8b commit 9f59369

File tree

1 file changed

+10
-7
lines changed
  • src/platforms/javascript/common/configuration/tree-shaking

1 file changed

+10
-7
lines changed

src/platforms/javascript/common/configuration/tree-shaking/index.mdx

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export default {
7575

7676
<PlatformSection supported={["javascript.nextjs"]}>
7777

78-
## Tree Shaking Optional Code With Next.js
78+
### Tree Shaking Optional Code With Next.js
7979

8080
To tree shake Sentry debug code in Next.js projects, you can use webpack's [DefinePlugin](https://webpack.js.org/plugins/define-plugin/) in your Next.js configuration.
8181

@@ -114,10 +114,13 @@ The following example shows how to create and bind a `Client` which enables tree
114114
```javascript {filename:main.js}
115115
import {
116116
BrowserClient,
117+
Breadcrumbs,
118+
Dedupe,
117119
defaultStackParser,
118-
makeFetchTransport,
119-
Integrations,
120120
getCurrentHub,
121+
GlobalHandlers,
122+
makeFetchTransport,
123+
LinkedErrors,
121124
} from "@sentry/browser";
122125

123126
const client = new BrowserClient({
@@ -129,10 +132,10 @@ const client = new BrowserClient({
129132
stackParser: defaultStackParser,
130133
// Only the integrations listed here will be used
131134
integrations: [
132-
new Integrations.Breadcrumbs(),
133-
new Integrations.GlobalHandlers(),
134-
new Integrations.LinkedErrors(),
135-
new Integrations.Dedupe(),
135+
new Breadcrumbs(),
136+
new GlobalHandlers(),
137+
new LinkedErrors(),
138+
new Dedupe(),
136139
],
137140
});
138141

0 commit comments

Comments
 (0)