layerchart
layerchart copied to clipboard
Move some components to sub directories/packages to reduce bundle size
Some components such as force, hierarchy, graph, and geo components have external dependencies (such as dagrejs, d3-force, and d3-geo) and are not as commonly used. These could be removed from top-level exports and exposed as sub paths to reduce bundle sizes in many cases.
import { ForceSimulation } from 'layerchart/force';
import { Dagre, Sankey } from 'layerchart/graph';
import { Pack, Partition, Tree, Treemap } from 'layerchart/hierarchy';
import { GeoPath, GeoPoint, GeoTile } from 'layerchart/geo';
GeoContext is integrated into Chart so d3-geo wouldn't be excluded, but d3-tile and a few other packages could be.