Skip to content

How to modularize react-plotly.js? #98

@hyperknot

Description

@hyperknot

The main plotly.js repo goes to great length about how to modularise the plotly code and avoid having the huge bundle with Mapbox, etc.

This library seems to be the official "basis of Plotly's React component suite", yet it's just loading the full plotly.js code.

import Plotly from 'plotly.js/dist/plotly';

This makes the bundle super big, Webpack super slow, and the minification time skyrocket as the codebase is simply just huge.

Since there is a whole article about modularizing plotly, it's strange to me that this lib requires the full build.

What is the best way to use react-plotly with a more minimal plotly bundle?

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