You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we use expo atlas to see dependency size and package contribution on the final bundle, we can see that lodash is loaded entirely and actually represent the second package contribution after React Native in the bundle size.
Almost 9% of the bundle size is due to lodash called only by this package in my app.
For only one function, I think it can be good to move away lodash and put the range function locally.
At least import only the required function (not _). But actually, tree shaking in expo is experimental
What do you think between this two solutions ?
The text was updated successfully, but these errors were encountered:
Hello,
When we use expo atlas to see dependency size and package contribution on the final bundle, we can see that lodash is loaded entirely and actually represent the second package contribution after React Native in the bundle size.
Almost 9% of the bundle size is due to lodash called only by this package in my app.
If we look in the code, we can see that the only lodash function used here is the
range
function in only one file (https://github.com/indiespirit/react-native-chart-kit/blob/master/src/contribution-graph/ContributionGraph.tsx#L311)For only one function, I think it can be good to move away lodash and put the range function locally.
At least import only the required function (not
_
). But actually, tree shaking in expo is experimentalWhat do you think between this two solutions ?
The text was updated successfully, but these errors were encountered: