Skip to content
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

Fix SDK source in CDN bundles #13435

Closed
3 tasks done
mydea opened this issue Aug 20, 2024 · 0 comments · Fixed by #13475
Closed
3 tasks done

Fix SDK source in CDN bundles #13435

mydea opened this issue Aug 20, 2024 · 0 comments · Fixed by #13475

Comments

@mydea
Copy link
Member

mydea commented Aug 20, 2024

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/browser

SDK Version

8.26.0

Framework Version

No response

Link to Sentry event

No response

Reproduction Example/SDK Setup

No response

Steps to Reproduce

Expected Result

Should return cdn.

Actual Result

Return npm

The problem is that we replace __SENTRY_SDK_SOURCE__ in the utils package already with npm, then we try to replace it again when building the CDN bundles, but at this point the magic string is already gone..

We should probably do this the same way as we do it for the debug flags, where we replace it twice.

@github-actions github-actions bot added the Package: browser Issues related to the Sentry Browser SDK label Aug 20, 2024
@mydea mydea added Type: Bug and removed Package: browser Issues related to the Sentry Browser SDK labels Aug 21, 2024
mydea added a commit that referenced this issue Aug 28, 2024
We used to replace `__SENTRY_SDK_SOURCE__` when we built
`@sentry/utils`, which means that we could not overwrite it anymore for
the CDN bundles, resulting in the SDK source being `npm` for the CDN
bundles.

This PR changes this so that this is correct now.

Closes #13435
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant