catamphetamine / react-phone-number-input

React component for international phone number input
http://catamphetamine.gitlab.io/react-phone-number-input/
MIT License
915 stars 193 forks source link

(Possibly Webpack) Build locks and fails if using utility functions #406

Open zackdotcomputer opened 2 years ago

zackdotcomputer commented 2 years ago

I cannot fully explain this yet, but here's the observed behavior:

This also happens if you use isValidPhoneNumber instead.

I'm unclear how this could be happening just from bringing those functions into scope even after having read through the code. If you have any ideas on how to debug further or fix please let me know.

catamphetamine commented 2 years ago

Hmm, that's weird.

See if using the original functions from libphonenumber-js works:

import {
    isValidPhoneNumber,
    isPossiblePhoneNumber,
    getCountryCallingCode,
    getCountries,
    isSupportedCountry
} from 'libphonenumber-js/min'