abhisekp / yup-phone

☎️ Adds a phone number validation check to yup validator using google-libphonenumber
https://www.npmjs.com/package/yup-phone
MIT License
240 stars 26 forks source link

Bundle Size #631

Open aress31 opened 3 years ago

aress31 commented 3 years ago

Whilst this project is amazing and should be included out of the box as a Yup rule, I can't help but notice the huge bundle size, see:

image

Could you please consider refactoring and improving the code so that it gets reflected in the bundle size? 🙏

JamesSingleton commented 3 years ago

@aress31 I am right there with you... I just noticed this adds about 103 KB to my Next.js page which ended up being a little over half the page size.

t-heuser commented 2 years ago

Just leaving https://gitlab.com/catamphetamine/libphonenumber-js here. We're using this for formatting phone numbers but it can also validate them. Replacing google-libphonenumber with this package would lower the bundle size without much effort invested.