validatorjs / validator.js

String validation
MIT License
23.15k stars 2.32k forks source link

question: readme bundle size reduction clarification? #1275

Open MovingGifts opened 4 years ago

MovingGifts commented 4 years ago

Hello in the readme it mentions both ways to reduce the bundle size:

Or, import only a subset of the library:

import isEmail from 'validator/lib/isEmail';

Tree-shakeable ES imports

import isEmail from 'validator/es/lib/isEmail';

How do these differ? Does one of them make a smaller bundle size than the other?

sebastian-fredriksson-bernholtz commented 1 year ago

I'm confused about this as well...

dkkim0122 commented 4 weeks ago

still no words..?