-
Notifications
You must be signed in to change notification settings - Fork 14
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
feat(filter-metadata): Filtered google lib metadata #14
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will be needing more time to review further.
I have given some initial thoughts
@nutboltu can you also remove the sub module its not required for development |
Note to me: Lets look at the diff of the our generated files & this https://github.com/googlei18n/libphonenumber/blob/master/javascript/i18n/phonenumbers/metadatalite.js |
@nutboltu The element in printed array shows the value of |
@superhit0 This is the starting point. I think we need to list down the number type and other metadata which we will remove from the validation. I tried adding |
@superhit0 I tested it in |
@nutboltu whats the file size now? |
@superhit0 Currect file size is |
downgrading node version in CI. jestjs/jest#8069 |
If we also remove |
Thats the thing right ? |
@patw0929 , @superhit0 This fact is we are only using following functions from this library.
But there's no tree shaking in the bundle. Considering those functions, I would say we can keep
I am not sure what's the benefits of keeping Now the main reason behind this huge bundle size is this There's few possible solution I can say:
We can only support |
@patw0929 any thoughts about this PR? |
Sweet! 🙌 I agree with you that we should consider reducing the bundle size. Just curious, what's the difference between the three solutions you listed above? |
|
Thank you for your detailed explanation! 👍 If we only want to support I personally think it is worthy to support mobile & fixed line. |
@patw0929 This PR is to support only mobile and fixed line. Please review this so that we can merge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great to me!
@patw0929 , @superhit0 are we happy to merge this PR? |
@patw0929 I am going to merge this PR. |
This PR excluded following metadata to reduce the bundle size.
It's unlikely to use these meta.
Also minified the dist/libphonenumber.js file