Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

require('stream/web).ReadableStream and require('stream/web).TransformStream errors #525

Open
avivash opened this issue Aug 22, 2023 · 1 comment

Comments

@avivash
Copy link

avivash commented Aug 22, 2023

Hi, thanks for making this package!

I'm using multiple third-party npm packages that call require('stream/web') with either ReadableStream or TransformStream. If I had access to those modules, I'd be able to pass readable-stream's Readable or Transform to them, but I'm not able to unfortunately. It also seems I can't alias the stream/web path specifically in my babel config, so I'm a little on the fence in terms of how best to approach this.

Do you have any thoughts around the best way to solve for this? Also, is there a reason this package isn't a 1:1 with stream in terms of its paths/exports? Thanks!

@rluvaton
Copy link
Member

The API for web streams match the WHATWG webstream (e.g. ReadableStream - MDN) they do not match the node streams API

These webstream specs were created around 2015 while node streams existed before that

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

No branches or pull requests

2 participants