-
Notifications
You must be signed in to change notification settings - Fork 808
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: google-libphonenumber is huge #248
Comments
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 |
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 Here's a visualisation of the space required by that lib (easy to compare with angular): The 2 red squares are |
great! thanks for your work. |
Hello any update for this? This issue is still valid, yet no progress in 18 months. Thanks |
The pull request #258 mentions a workaround |
BREAKING CHANGE: Validation functions was removed from `Validator` class to enable tree shaking. BEFORE: import {Validator} from "class-validator"; const validator = new Validator(); validator.isNotIn(value, possibleValues); validator.isBoolean(value); AFTER: import {isNotIn, isBoolean} from "class-validator"; isNotIn(value, possibleValues); isBoolean(value); Closes #258, #248, #247, #212
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. |
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.
The text was updated successfully, but these errors were encountered: