4 ms·
Including dependencies and localization, d3-scale is 69KB minified and 24KB gzipped. You can make it smaller by excluding optional dependencies if they are not
by mbostock 11y ago
Including dependencies and localization, d3-scale is 69KB minified and 24KB gzipped. You can make it smaller by excluding optional dependencies if they are not needed, such as d3-time and d3-time-format; you can make it even smaller by creating a custom bundle using Rollup. Here’s an example:
http://bl.ocks.org/mbostock/9bd540de6728a1fb9343 http://bl.ocks.org/mbostock/9bd540de6728a1fb9343
So, yes. Making it easier for people to include only the code they are using is one of the motivations for breaking D3 up into separate modules (and adopting ES6 modules).
- frik 11y agoGreat, thanks a lot! Keep up your great work!