Closed markrickert closed 1 year ago
:warning: Please install the to ensure uploads and comments are reliably processed by Codecov.
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 76.92%. Comparing base (
a02be71
) to head (395616c
). Report is 3 commits behind head on master.
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Hello @jsamr, Any updates on the release of this improvement?
Checks
Description
While inspecting my app with
react-native-bundle-visualizer
i noticed thatramda
was including a LOT of things in the final metro bundle. I don't useramda
so runningyarn why ramda
revealed that this library was including it.Normal javascript libraries like
ramda
,lodash
, anddate-fns
don't tree-shake so their imports have to be referenced specifically. All of theramda
imports in this library are in the form of:except the import to
mapObjIndexed
which was done like so:Because of the way
mapObjIndexed
is imported, metro includes ALL oframda
in the final bundle. This PR changes the import so that all the unnecessary parts oframda
aren't included in every app bundle that uses this library.Overall, this will reduce the footprint of this library by about 55 kb.
ramda
used to take up66.11 kb
and now it will only take up10.26 kb
, a reduction of84.5%
!Screenshots taken using react-native-bundle-visualizer
Before:
After: