Skip to content

Move some components to sub directories/packages to reduce bundle size #617

@techniq

Description

@techniq

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    Up next

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions