-
Notifications
You must be signed in to change notification settings - Fork 510
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
Any possibility of reducing bundle size? #728
Comments
This issue has been added to our internal backlog to be prioritized. Pull requests and +1s on the issue summary will help it move up the backlog. |
+1 |
+1 |
+1 for instance, change axios for built in fetch in NodeJS, if fetch isn't provided by the env, let user polyfill it themself with either undici, node-fetch or other |
+1 |
Solution: I spun up webpack, set it to target node, and terser-packed twilio-sdk into a single file (2mb) code can be found here: https://github.com/mariomui/twilio-node/tree/smaller-build Observations: Summary: Prolly need a discussion on whether or not minifying it for lambdas is a good stop gap measure. |
Hey folks, we've recently released version 4.0.0 of twilio-node which introduces a ~30% reduction in bundle size. Community support is also welcome for any further contributions or propositions to reduce bundle size. |
Today the entire package is over 13 mb. I'm using webpack to merge the code into a single file to run on AWS Lambda and about 96% of the package is from twilio.
One of the possibilities is to make the package more modular. AWS did this with the SDK and the result is very significant.
When using only S3, in version 2, it compiled about 69 mb. With version 3, only 3.9 mb.
Any chance of this happening with this twilio package?
The text was updated successfully, but these errors were encountered: