Skip to content

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

@mydea

Description

@mydea

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions