Skip to content

Commit 1a28136

Browse files
Lms24imatwawana
authored andcommitted
Apply suggestions from code review
Co-authored-by: Isabel <[email protected]>
1 parent d1eab4e commit 1a28136

File tree

1 file changed

+9
-5
lines changed
  • src/platforms/javascript/common/configuration/tree-shaking

1 file changed

+9
-5
lines changed

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

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ To make optional code eligible for tree shaking, you can replace various flags i
2929

3030
### Tree Shaking Optional Code With Webpack
3131

32-
To tree shake Sentry debug code in your webpack bundles, we recommend using webpack's [DefinePlugin](https://webpack.js.org/plugins/define-plugin/).
32+
To tree shake Sentry debug code in your webpack bundles, we recommend using webpack's [DefinePlugin](https://webpack.js.org/plugins/define-plugin/):
3333

3434
```javascript {filename:webpack.config.js}
3535
const webpack = require("webpack");
@@ -52,7 +52,7 @@ module.exports = {
5252

5353
### Tree Shaking Optional Code With Rollup
5454

55-
If you're using `rollup.js`, we recommend using [Rollup's `replace` plugin](https://github.com/rollup/plugins/tree/master/packages/replace).
55+
If you're using `rollup.js`, we recommend using [Rollup's `replace` plugin](https://github.com/rollup/plugins/tree/master/packages/replace):
5656

5757
```javascript {filename:rollup.config.js}
5858
import replace from "@rollup/plugin-replace";
@@ -102,9 +102,9 @@ For more information on custom webpack configurations in Next.js, see [Custom We
102102
## Tree Shaking Default Integrations
103103

104104
By default, the Sentry SDK sets up a list of [default integrations](../integrations/default) that extend your
105-
SDK functionality. Furthermore, you can also add [additional](../integrations/plugin) or [custom](../integrations/custom)
105+
SDK functionality. You can also add [additional](../integrations/plugin) or [custom](../integrations/custom)
106106
integrations to your SDK configuration.
107-
In case you do not want to include default integrations in your config, you can [disable](../options/#integration-configuration)
107+
If you don't want to include default integrations in your config, you can [disable](../options/#integration-configuration)
108108
them and add your custom array of integrations.
109109
However, if you also want to tree shake the unused default integrations, you can do so by creating a `Client` yourself.
110110
By doing this, you essentially bypass `Sentry.init` which normally creates a `Client` for you.
@@ -139,5 +139,9 @@ const client = new BrowserClient({
139139
getCurrentHub().bindClient(client);
140140
```
141141

142-
Note that in contrast to `Sentry.init`, the `Client` constructor expects options of type `ClientOptions` instead of `Options`.
142+
<Note>
143+
144+
In contrast to `Sentry.init`, the `Client` constructor expects options of type `ClientOptions` instead of `Options`.
143145
This means that the `ClientOptions.integrations` property is the final array of integrations that will be used.
146+
147+
</Note>

0 commit comments

Comments
 (0)