Closed mfulton26 closed 4 days ago
Thanks @mfulton26, we will go ahead and integrate proposed change for lodash. However axios dependency is slightly more complex, since we need to make sure this package can work on Mobile using React Native.
Thanks @mfulton26, we will go ahead and integrate proposed change for lodash. However axios dependency is slightly more complex, since we need to make sure this package can work on Mobile using React Native.
Sounds good to me. I think pulling in all of lodash
into bundled web apps was my main concern. It does, however, appear that React Native does support the Fetch API: https://reactnative.dev/docs/network. Long term it may be good to move off of axios
. (One less dependency to keep up to date, patch for new security vulnerability alerts, etc.)
Thank you.
My team is trying to reduce the size of our app and
twilio-taskrouter
is one of the larger dependencies in the web app. Can efforts be made to reduce the size?Two opportunities I see are:
fetch
API instead ofaxios
(either directly or via a thin wrapper for convenience methods, e.g.ky
)._
) should allow tree shaking for webpack/rollup/etc. Another option is to use Lodash custom builds. Some or all of the usages can be replaced using modern ES built-ins too.twilio-taskrouter
currently only uses 13 methods fromlodash
(excluding a few other usages in tests/specs):