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

[Replay] Generate CDN bundles #6362

Closed
4 tasks done
Tracked by #5326
Lms24 opened this issue Dec 1, 2022 · 3 comments
Closed
4 tasks done
Tracked by #5326

[Replay] Generate CDN bundles #6362

Lms24 opened this issue Dec 1, 2022 · 3 comments
Assignees
Labels
Dev: Build Package: replay Issues related to the Sentry Replay SDK

Comments

@Lms24
Copy link
Member

Lms24 commented Dec 1, 2022

We want to create CDN bundles for Replay, just like we have bundles for all our other integrations.

Bundle variants

To be consistent with our other integration CDN bundles, we'd have to generate these variants (base name up for discussion):

  • replay.js
  • replay.min.js
  • replay.debug.min.js
  • replay.es5.js
  • replay.es5.min.js
  • replay.es5.debug.min.js

Open Question: Do we need ES5 variants at all?

Update: We cannot publish ES5 bundles because rrweb internally depends on ES6-only APIs.

Release Registry

To make the bundles show up in our docs correctly (including a checksum), we have to add Replay to the release registry. To do this, we'll have to follow the Release Checklist and stick to the order of releasing and adding things to the registry.

How does this work for CDN bundles? Our checklist only covers NPM tarballs

To Do:

ref: #5326

@Lms24 Lms24 self-assigned this Dec 1, 2022
@Lms24 Lms24 added Dev: Build Package: replay Issues related to the Sentry Replay SDK labels Dec 1, 2022
@Lms24 Lms24 changed the title Create Replay CDN bundles [Replay ]Generate CDN bundles Dec 2, 2022
@lforst lforst changed the title [Replay ]Generate CDN bundles [Replay] Generate CDN bundles Dec 2, 2022
@Lms24
Copy link
Member Author

Lms24 commented Dec 5, 2022

Closing this as completed because as it turns out, we don't have to add Release Reg. entries. All our CDN bundles are associated with the Browser SDK: https://github.com/getsentry/sentry-release-registry/blob/master/packages/npm/%40sentry/browser/7.23.0.json

@Lms24 Lms24 closed this as completed Dec 5, 2022
@jiwon-mun
Copy link

jiwon-mun commented Jul 31, 2023

Do you have any plan to add replay.es5.min.js? I need it.

Or is there a simple way to transfile es5 from replay.min.js?
I just need a code.

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 Jul 31, 2023
@mydea
Copy link
Member

mydea commented Jul 31, 2023

Hi @jiwon-mun ,

sadly replay is not ES5 compatible, because rrweb (which we use under the hood to do the recording etc.) relies on ES6-only APIs. So there will not be an ES5 version of replay.

If you need to also support ES5, I would recommend to do something like this:

function loadSentry() {
  const sentrySrcUrl = hasEs6Support() ? 'https://browser.sentry-cdn.com/7.60.0/bundle.tracing.replay.min.js' : 'https://browser.sentry-cdn.com/7.60.0/bundle.tracing.es5.min.js';
  // add <script> to DOM and initialize stuff
}

We may want to think about adding this capabilities to the loader eventually, but for now you'll need to do this manually. I opened getsentry/sentry#53840 to track this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dev: Build Package: replay Issues related to the Sentry Replay SDK
Projects
Archived in project
Development

No branches or pull requests

3 participants