Proposal: Modularize out a non-stream version of the package
Closed this issue · 2 comments
I think for some purposes, it is not necessary to use streams to parse the GFF, and it may be worth it to make a non-stream version. It complicates browserification, and even with the "browser":"stream-browserify" branch, it seems to cause issue (as seen by @garrettjstevens work on web streams as an alternative, trying to just remove this entirely)
I would say a non-stream version could be conceptually 'simpler' to reason about, though it could result in some code duplication if we maintain a non-stream and a stream version
also, tangent, but if the "browser":"stream-browserify" package.json field is causing significant issue, we could revert it potentially
Oh, this would be awesome. I'm currently struggling with this package, as the stream-browserify
workaround does not behave nicely on Vite.
Module "events" has been externalized for browser compatibility. Cannot access "events.EventEmitter" in client code. See http://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.
@gmod_gff.js?v=53f624f2:16
Uncaught ReferenceError ReferenceError: global is not defined
at ../../node_modules/readable-stream/lib/_stream_readable.js
...