Skip to content

Avoid bundling @d3/shape #455

@mxstbr

Description

@mxstbr

Looking at @primer/components on bundlephobia, it's massive (40kB min+gzip), and a big part of that is the @d3/shape dependency that is in the core bundle due to being used in the Donut component.

We will most likely not end up using the Donut component, so shipping all that code is a bit of a pain. Is there any chance that the d3 dependency could maybe be loaded asynchronously when needed or that the Donut component gets put into its own bundle?

EDIT: Found a workaround in #456 by importing specific components. It would still be good to see this solved by default.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions