-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
ref(build): Add debug constants in each package individually #4842
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to find a place to write this down in the repo. Can we update CONTRIBUTING.md
accordingly?
size-limit report 📦
|
This looks good. My only suggestion would be to explain (in the comment at the top of each |
Replaced with a constant that can be treeshaked. See getsentry/sentry-javascript#4842
Replaced with a constant that can be treeshaked. See getsentry/sentry-javascript#4842
In #4842, a `flags.ts` file was added to each package to fix logger treeshaking when using webpack. Because of the way that webpack works, this file has to exist separately in each individual package, including in `@sentry/integrations`. It is not itself an integration, though, so we shouldn't be building a separate CDN bundle for it (let alone six versions of one). This fixes the build script so that we're no longer doing that.
In #4842, a `flags.ts` file was added to each package to fix logger treeshaking when using webpack. Because of the way that webpack works, this file has to exist separately in each individual package, including in `@sentry/integrations`. It is not itself an integration, though, so we shouldn't be building a separate CDN bundle for it (let alone six versions of one). This fixes the build script so that we're no longer doing that.
In #4842, a `flags.ts` file was added to each package to fix logger treeshaking when using webpack. Because of the way that webpack works, this file has to exist separately in each individual package, including in `@sentry/integrations`. It is not itself an integration, though, so we shouldn't be building a separate CDN bundle for it (let alone six versions of one). This fixes the build script so that we're no longer doing that.
In #4842, a `flags.ts` file was added to each package to fix logger treeshaking when using webpack. Because of the way that webpack works, this file has to exist separately in each individual package, including in `@sentry/integrations`. It is not itself an integration, though, so we shouldn't be building a separate CDN bundle for it (let alone six versions of one). This fixes the build script so that we're no longer doing that.
In #4842, a `flags.ts` file was added to each package to fix logger treeshaking when using webpack. Because of the way that webpack works, this file has to exist separately in each individual package, including in `@sentry/integrations`. It is not itself an integration, though, so we shouldn't be building a separate CDN bundle for it (let alone six versions of one). This fixes the build script so that we're no longer doing that.
Replaced with a constant that can be treeshaked. See #4842
We've identified that our current way of importing
isDebugBuild()
from@sentry/utils
is difficult some build tooling (ie. weback) to tree shake.As we want to facilitate tree shaking of unwanted code for users as much as possible, this PR will:
isDebugBuild
function to a constIS_DEBUG_BUILD
Ref: https://getsentry.atlassian.net/browse/WEB-769