Open C0Nd3Mnd opened 4 years ago
Install newer version? class-validator is just a peer dep
I use version 0.12.2. I think the problem is that class-transformer-validator
is importing the whole class-validator
package. When I leave class-transformer-validator
out of my project, the bundle doesn't include google-libphonenumber
and is significantly smaller.
I use version 0.12.2. I think the problem is that class-transformer-validator is importing the whole class-validator package.
It's importing only a few functions 😕 https://github.com/MichalLytek/class-transformer-validator/blob/5d25d52e473f0280a3e7a354e0e141416f771ebb/src/index.ts#L1-L7
Hm I see. I'm gonna have to dig deeper then. I'll post here if and when I find a possible solution.
Using
class-transformer-validator
results ingoogle-libphonenumber
being included in the webpack bundle (even though tree shaking is enabled and no phone number validators are being used).This was fixed in
class-validator
itself, see:I'm wondering if there is an "easy" fix for this package?