Hi,
I don't know whether you are aware, but the dependency of this library, google-libphpnenumber takes almost 0.5MB of size in production bundle.
I use your library in my package and I can't increase the version number because of this as my bundle rises from 800KB to 1300KB because of this.
If this is by design then close the issue, I am just raising awareness in case you were not aware.
I agree with OP. The library google-libphonenumber is huge. By adding it to class-validator it means that using it in a browser scenario becomes problematic due to the bundle size. I vote to remove google-libphonenumber from class-validator.
You are right. Hopefully, I can fix this at the weekend, alongside with the other issues. I have been pretty busy in the latest month, but I will take a week off to work on the Typestack libraries. And again, sorry for the late response.
@NoNameProvided
That's great!
Please let me know if you require any assistance. I have some free time for the next few weeks and I'd be happy to help.
Thanks.
Hi!
There is already an in-progress PR for this at #258.
Hi there, any news?
Our build just thrown an error on CI after importing a shared class between the backend and the frontend into the frontend. It's a simple class with only @IsOptional and @isString but now our bundle exceed the 2.5mb limit that we've set on our bundles.
Here's a visualisation of the space required by that lib (easy to compare with angular):

The 2 red squares are validator and class-validator:

great! thanks for your work.
Hello any update for this? This issue is still valid, yet no progress in 18 months. Thanks
Hello any update for this? This issue is still valid, yet no progress in 18 months. Thanks
The pull request #258 mentions a workaround
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
Hi!
There is already an in-progress PR for this at #258.