Uh oh!
There was an error while loading. Please reload this page.
Add guide for tree shaking in JavaScript - #4900
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/sentry/sentry-docs/8BUibRAVaoWhQo6YLdi2z2Zsbmp5 |
AbhiPrasad
commented
Apr 5, 2022
I think this might be important enough that we elevate to it's own page under https://docs.sentry.io/platforms/javascript/configuration/. What do you think? |
| To mark any debug code as unused, we must replace debug flags in the sentry SDK with `false`. We outlined examples of how to do this in popular toolchains below. | ||
| ### Tree-shaking Debug Code with webpack |
There was a problem hiding this comment.
should we hide these for the nextjs platform?
There was a problem hiding this comment.
Yeah you're right. For nextjs, only the nextjs config section makes sense. Updated in: 41391dc
imatwawana
left a comment
There was a problem hiding this comment.
The writing here is solid! I've just made a number of edits to follow our style guide. Please ping me for review when you've made updates so I can give it another quick read.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
lforst
commented
Apr 5, 2022
@AbhiPrasad I would currently let it live under troubleshooting. When we figured out the tree shaking stuff a bit more (ie, shaking the tracing in next.js) it suddenly becomes a lot more important and I would consider moving it to its own page. |
AbhiPrasad
commented
Apr 5, 2022
The only consequence of this is that we would have to leave a link from the current location to the new one so that users do not get confused - IMO there's not much more to figure out, I'd rather just do it right the first time here. |
lobsterkatie
left a comment
There was a problem hiding this comment.
Nice. Nothing major on my end - mostly just wordsmithing.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Katie Byers <katie.byers@sentry.io>
In getsentry/sentry-javascript#4842 we made the JavaScript SDKs a little bit more tree-shakable.
We now want to explain users how to get rid of debug code if they don't want debug functionality in their code.
PR should not be merged before getsentry/sentry-javascript#4842 is released.
Ref: https://getsentry.atlassian.net/browse/WEB-772