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

ref(browser): Remove XHR transport from default bundle #5927

Closed
Tracked by #9508
timfish opened this issue Oct 11, 2022 · 6 comments · Fixed by #10703
Closed
Tracked by #9508

ref(browser): Remove XHR transport from default bundle #5927

timfish opened this issue Oct 11, 2022 · 6 comments · Fixed by #10703

Comments

@timfish
Copy link
Collaborator

timfish commented Oct 11, 2022

Problem Statement

fetch is supported in all browsers supported by the browser SDK.

Solution Brainstorm

Can this be removed from the default bundle (along with the fetch detection) and only offered as an optional transport?

@AbhiPrasad
Copy link
Member

Although we transpile to es5, we don't include polyfills for IE11 (like fetch), so this change would effectively mean that we drop support for IE11.

Another decision we can take is to drop the fetch transport and only use the XHR one by default - @lforst brought this up.

@timfish
Copy link
Collaborator Author

timfish commented Oct 11, 2022

Don't we already require a list of polyfills for IE support and could we not just add fetch to that list?

@AbhiPrasad
Copy link
Member

If you're referencing the page in our docs, that's because prior to 5.7.0 we required polyfills for IE11 support. After 5.7.0 we refactor the SDK to no longer require polyfills, see: #2243.

@timfish
Copy link
Collaborator Author

timfish commented Oct 11, 2022

Ah right, I think I got this idea from Katies comment here but now realise required polyfills is not a thing yet!

For IE11, we've already told people that they have to use one of our ES5 bundles, to which we could add a polyfill if necessary

@AbhiPrasad
Copy link
Member

Going to backlog this - will eventually happen but will take a while.

@mydea
Copy link
Member

mydea commented Mar 3, 2023

IMHO this is a good candidate for v8 (moving this out of browser and making it opt-in). I'll add the v8 milestone.

@mydea mydea added this to the 8.0.0 milestone Mar 3, 2023
@mydea mydea mentioned this issue Nov 9, 2023
AbhiPrasad added a commit that referenced this issue Feb 21, 2024
resolves #5927

Removes `makeXHRTransport` and makes the fetch transport the default
one.

I've also added a warning warning to browser client init that states
that the sentry browser sdk requires the fetch API to function.
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.

4 participants