Skip to content

Detect ES6 support in loader & fetch corresponding CDN bundle #53840

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

Closed
mydea opened this issue Jul 31, 2023 · 0 comments
Closed

Detect ES6 support in loader & fetch corresponding CDN bundle #53840

mydea opened this issue Jul 31, 2023 · 0 comments
Assignees

Comments

@mydea
Copy link
Member

mydea commented Jul 31, 2023

Currently, the Loader Script will always fetch the ES5 bundle, unless replay is enabled, then we always fetch the ES6 bundle (because replay does not support ES5).

This has two negative side effects:

  • When replay is not enabled, the majority of users that actually have an ES6 browser will get the less optimized ES5 version shipped
  • When replay is enabled, users with ES5 browsers will not get a working sentry instance.

I propose to detect ES6 support (e.g. via checking <script nomodule>, which should be good enough for our purposes), and then loading the ES6 bundles based on this. If replay is enabled and there is no ES6 support, we disable replay and load the replay-less ES5 bundle.

@mydea mydea self-assigned this Jul 31, 2023
@mydea mydea closed this as completed May 27, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jun 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant