rrweb icon indicating copy to clipboard operation
rrweb copied to clipboard

[Bug]: Breaking change in alpha 2.0.0-alpha.15: ES2019 syntax

Open jakewski opened this issue 11 months ago • 0 comments

Preflight Checklist

  • [X] I have searched the issue tracker for a bug report that matches the one I want to file, without success.

What package is this bug report for?

rrweb

Version

2.0.0-alpha.15

Expected Behavior

rrweb should work for browsers that do not support optional catch binding https://2ality.com/2017/08/optional-catch-binding.html. The compatibility note in the readme states that rrweb should work for browsers that support the MutationObserver API https://2ality.com/2017/08/optional-catch-binding.html. I did not check for other breaking changes, but possible there are

Actual Behavior

rrweb imports have ES2019 syntax which breaks old compatibility

prior to 2.0.0-alpha.15 the rrweb source code also had optional catch binding but was compiled to be more compatible in the dist files.

Steps to Reproduce

  1. install rrweb via npm
  2. see the main rrweb module entrypoints contain ES2019 syntax (rrweb.js, rrweb.cjs)

Testcase Gist URL

No response

Additional Information

No response

jakewski avatar Oct 31 '24 23:10 jakewski