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

FR: Avoid using bigint literal syntax to target older browsers #541

Closed
mman opened this issue Oct 8, 2024 · 2 comments · Fixed by #549
Closed

FR: Avoid using bigint literal syntax to target older browsers #541

mman opened this issue Oct 8, 2024 · 2 comments · Fixed by #549

Comments

@mman
Copy link
Contributor

mman commented Oct 8, 2024

One of my projects targets very old specialised browsers, and when readable-stream dependency is brought in the webpack produced code fails to run because of SyntaxError here:

if (input > 2n ** 32n || input < -(2n ** 32n)) {
received = addNumericalSeparator(received)

Turns out that specialised browser based on WebKit can not parse bigint literals.

I'm not sure if I am missing something but I was not able to find a solution to transpile the bigint literals correctly to target older browsers.

But turns out that the fix could be to avoid bigint literal and use BigInt constructor.

@mman
Copy link
Contributor Author

mman commented Oct 8, 2024

Attempt to address this cleanly here: #542

@mman
Copy link
Contributor Author

mman commented Dec 19, 2024

Addressed by #542

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant