blob-stream icon indicating copy to clipboard operation
blob-stream copied to clipboard

Provide browser-specific version

Open ciclentfort opened this issue 3 years ago • 1 comments

Recently create-react-app version 5 was released, which internally switched from webpack 4 to webpack 5. Webpack 4 used to set up polyfils for the stream and the utils package. Webpack 5 stopped this automatically polyfilling. Since create-react-app v5 unfortunately does not provided an easy way set configure webpack, the easiest way forward might be to provide a browser specific version of this package.

Would there be any interest in this change? If so I'd be happy to work on it.

ciclentfort avatar Jan 24 '22 10:01 ciclentfort

Similar issue with Vite.

blob-stream doesn't work without node polyfills, which adds hundreds of kb to our build. The standalone browser blob-stream.js release is 131kb.

I made a more minimal browser-blob-stream.ts. It is only tested with pdfkit standalone on modern browsers.

forresto avatar Sep 08 '25 10:09 forresto