MattiasBuelens / web-streams-polyfill

Web Streams, based on the WHATWG spec reference implementation
MIT License
285 stars 29 forks source link

Could you please decrease the size of the package? #146

Closed sipayRT closed 6 months ago

sipayRT commented 6 months ago

Hello

The current size of the installed package is almost 9MB. It seems like it's too much for an average package size. Is it really necessary to include all files (including *.map) for the package to function correctly? It seems like it would be enough to publish only the minified files from the list below.

$ du -sh node_modules/web-streams-polyfill/dist/* | sort -hr

436K    node_modules/web-streams-polyfill/dist/ponyfill.mjs.map
436K    node_modules/web-streams-polyfill/dist/ponyfill.js.map
436K    node_modules/web-streams-polyfill/dist/polyfill.mjs.map
436K    node_modules/web-streams-polyfill/dist/polyfill.js.map
424K    node_modules/web-streams-polyfill/dist/ponyfill.es6.js.map
424K    node_modules/web-streams-polyfill/dist/polyfill.es6.mjs.map
424K    node_modules/web-streams-polyfill/dist/polyfill.es6.js.map
420K    node_modules/web-streams-polyfill/dist/ponyfill.es6.mjs.map
400K    node_modules/web-streams-polyfill/dist/ponyfill.es2018.mjs.map
400K    node_modules/web-streams-polyfill/dist/ponyfill.es2018.js.map
400K    node_modules/web-streams-polyfill/dist/polyfill.es2018.mjs.map
400K    node_modules/web-streams-polyfill/dist/polyfill.es2018.js.map
372K    node_modules/web-streams-polyfill/dist/polyfill.min.js.map
364K    node_modules/web-streams-polyfill/dist/polyfill.es6.min.js.map
344K    node_modules/web-streams-polyfill/dist/polyfill.es2018.min.js.map
228K    node_modules/web-streams-polyfill/dist/ponyfill.js
228K    node_modules/web-streams-polyfill/dist/polyfill.js
216K    node_modules/web-streams-polyfill/dist/polyfill.es6.js
212K    node_modules/web-streams-polyfill/dist/ponyfill.es6.js
212K    node_modules/web-streams-polyfill/dist/polyfill.es2018.js
208K    node_modules/web-streams-polyfill/dist/ponyfill.mjs
208K    node_modules/web-streams-polyfill/dist/ponyfill.es2018.js
208K    node_modules/web-streams-polyfill/dist/polyfill.mjs
196K    node_modules/web-streams-polyfill/dist/ponyfill.es6.mjs
196K    node_modules/web-streams-polyfill/dist/polyfill.es6.mjs
192K    node_modules/web-streams-polyfill/dist/ponyfill.es2018.mjs
192K    node_modules/web-streams-polyfill/dist/polyfill.es2018.mjs
 84K    node_modules/web-streams-polyfill/dist/types
 72K    node_modules/web-streams-polyfill/dist/polyfill.min.js
 68K    node_modules/web-streams-polyfill/dist/polyfill.es6.min.js
 64K    node_modules/web-streams-polyfill/dist/polyfill.es2018.min.js
...
total: 8.7M
MattiasBuelens commented 6 months ago

This has been fixed in version 4.0.0. The package now only weighs 441 kB. 🙂

See the migration guide on how to handle the breaking changes.

sipayRT commented 6 months ago

Sorry, my fault. I didn't test it on the major version. Yes, everything looks great on the latest version, thanks