vue-tel-input
vue-tel-input copied to clipboard
Option to have separate builds/import versions with less features and less weight
First, thanks for a great UI library!
Since vue-tel-input is a high level UI component it makes use of several other packages:
- Telephone Number parsing, validation by libphonenumber-js.
- Country Codes data from intl-tel-input.
- Country Flags by behdad/region-flags.
- User's Location by get-json and ipifo.io
by directly importing them (https://github.com/EducationLink/vue-tel-input/blob/master/src/assets/default-country.js#L1, etc).
That lead to the situation that by using vue-tel-input I got +92kb extra in my minified and gzipped bundle ;(( That's a common problem with ecosystem, but I'd say it's too much for just for one phone input...
Maybe there could be a pre built bundles that don't use some of the functionality.
// generic with all features
import {VueTelInputFull} from 'vue-tel-input'
// if I don't use flags and geo location feature
import {VueTelInputNoGeolocation} from 'vue-tel-input'
// etc
@shershen08 thanks for reaching out. It sounds like a very good idea, we might implement it in the next releases.
@iamstevendao I'll try create a PR on that one
@shershen08 <3
Any update on this?
This would be really useful!
I didn't know this library is so huge.
https://bundlephobia.com/[email protected]
It's the same size as entire bootstrap.
Any update on this? This would be really useful to improve overall bundle size