calvinmetcalf / rollup-plugin-node-builtins

138 stars 40 forks source link

Readable stream - invalid Uint8Array chunk in browser #57

Open AuHau opened 5 years ago

AuHau commented 5 years ago

The version of readable-stream used in this package seems very old because it does not allow usage of Uint8Array which is used in modern browsers as type for Buffer implementation. Hence it is recognized as "invalid chunk".

This function performs the check: https://github.com/calvinmetcalf/rollup-plugin-node-builtins/blob/master/src/es6/readable-stream/readable.js#L353

In current version of readable-stream this check is done as follow: https://github.com/nodejs/readable-stream/blob/master/lib/_stream_readable.js#L311

Let me know if PR would be accepted to update the used readable-stream in this library. @calvinmetcalf ?