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
This is larger than react+react-dom (96KB), jQuery (85KB), lodash (69KB), bootstrap (49KB) and flot (32KB)
...all added together! (And I don't think this is even including the CSS)
Whilst 70% of the 385KB comes from the dependencies of metrics-graphics - the weight they add can't just be written off when discussing its size, since it's the way that metrics-graphics is structured/bundled that causes all of them to be included even if they are not used.
It's also worth noting that d3 got quite a bit larger in v5 (compare v4 and v5) which is not included in the above (since the v5 upgrade is only on master) - so the issue is going to be even worse in the next release / over time as the d3 package ecosystem gets larger.
Hi :-)
The README currently says:
However it actually causes a 385KB (minified) increase in bundle size:
https://bundlephobia.com/result?p=metrics-graphics@2.15.6
This is larger than react+react-dom (96KB), jQuery (85KB), lodash (69KB), bootstrap (49KB) and flot (32KB)
...all added together! (And I don't think this is even including the CSS)
Whilst 70% of the 385KB comes from the dependencies of metrics-graphics - the weight they add can't just be written off when discussing its size, since it's the way that metrics-graphics is structured/bundled that causes all of them to be included even if they are not used.
It's also worth noting that d3 got quite a bit larger in v5 (compare v4 and v5) which is not included in the above (since the v5 upgrade is only on
master
) - so the issue is going to be even worse in the next release / over time as the d3 package ecosystem gets larger.Things that would likely help with this:
d3
package (eg Use subset of d3 v4 modules #662 / Use subset of d3 v4 modules #667)main
in package.json, the latter undermodule
)"sideEffects": "false"
can be used for improved tree shakability: https://webpack.js.org/guides/tree-shaking/#mark-the-file-as-side-effect-freeThe text was updated successfully, but these errors were encountered: