mebjas / html5-qrcode

A cross platform HTML5 QR code reader. See end to end implementation at: https://scanapp.org
https://qrcode.minhazav.dev
Apache License 2.0
4.87k stars 959 forks source link

[Feature Request] Minify the zxing-js.umd.js #836

Open nygmaaa opened 11 months ago

nygmaaa commented 11 months ago

Is your feature request related to a problem? Please describe. When I analyze the bundle size of my project, I find that the html5-qrcode library is a huge block with zxing-js.umd.js, the zxing-js.umd.js size is 1.05 MB, The file takes 1/5 of my app bundle size. image

Describe the solution you'd like Can you help minify the zxing-js.umd.js to zxing-js.umd.min.js and require the minified one instead? The picture below is the result I used https://minify-js.com/ to minify the zxing-js.umd.js, we can save 785.36 kB after minifying.

image

Describe alternatives you've considered

Additional context

Robula commented 6 months ago

Could we get an ESM version of zxing-js too, please? That will surely help with the bundle sizes.

ROBERT-MCDOWELL commented 6 months ago

you can make a PR if you wish