Open mman opened 1 month ago
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:
readable-stream
SyntaxError
https://github.com/nodejs/readable-stream/blob/a2e9aedf4aeee4a5e4d8efcb175edb67e2817eaa/src/errors.js#L339-L340
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.
BigInt
Attempt to address this cleanly here: https://github.com/nodejs/readable-stream/pull/542
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 ofSyntaxError
here:https://github.com/nodejs/readable-stream/blob/a2e9aedf4aeee4a5e4d8efcb175edb67e2817eaa/src/errors.js#L339-L340
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.