-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
ref(browser): Skip browser extension warning in non-debug builds #15310
Conversation
size-limit report 📦
|
❌ 2 Tests Failed:
View the top 2 failed tests by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
packages/browser/src/sdk.ts
Outdated
@@ -172,7 +172,7 @@ declare const __SENTRY_RELEASE__: string | undefined; | |||
export function init(browserOptions: BrowserOptions = {}): Client | undefined { | |||
const options = applyDefaultOptions(browserOptions); | |||
|
|||
if (!options.skipBrowserExtensionCheck && shouldShowBrowserExtensionError()) { | |||
if (DEBUG_BUILD && !options.skipBrowserExtensionCheck && shouldShowBrowserExtensionError()) { |
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.
A side-effect to keep in mind is that our regular CDN bundles would then still init the SDK in browser extensions. If it was just about the warning, I'd say that's fine but we bail in the same block. Should we just guard the console log part instead?
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.
ah, yeah, you are right of course 🤔 i mean, this will have less savings (as the code to check all of this still runs) but is probably safer 👍
cae14ab
to
514ca96
Compare
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.
thx for changing!
I think it is fair to exclude this here, saving a few bytes...?
514ca96
to
5d249bc
Compare
I think it is fair to exclude this here, saving a few bytes...?