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
Copy file name to clipboardExpand all lines: src/platforms/javascript/common/troubleshooting/index.mdx
+10Lines changed: 10 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -408,7 +408,11 @@ Remember to pass in `true` as the second parameter to `addEventListener()`. With
408
408
409
409
Sentry ships with code that enables you to <PlatformLinkto="/configuration/options/#debug">debug your Sentry configuration</PlatformLink>. While this code can be very useful in development environments, it's not typically necessary to include it in your production bundles where it takes up valuable space. The JavaScript SDK uses special flags in its CommonJS and ESM distributions to facilitate tree shaking of code sections that are used for debugging. Tree shaking is a way to remove unused code in your application during the build process.
To mark any debug code as unused, you must replace debug flags in the Sentry SDK with `false`. We've outlined examples of how to do this in popular toolchains below.
If you're using rollup.js, we recommend [rollup's replace plugin](https://www.npmjs.com/package/@rollup/plugin-replace) to replace all occurrences of `__SENTRY_DEBUG__` with `false`:
0 commit comments