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

Open
mman opened this issue Oct 8, 2024 · 1 comment
Open

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

mman opened this issue Oct 8, 2024 · 1 comment

Comments

@mman
Copy link

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
Author

mman commented Oct 8, 2024

Attempt to address this cleanly here: #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

No branches or pull requests

1 participant