Skip to content

Distributing partial plotly.js bundles #684

Closed
@etpinard

Description

@etpinard

We currently distribute 3 plotly.js bundles:

  • plotly.js
  • plotly.min.js (minified version of plotly.js)
  • plotly-with-meta.js (plotly.js including attribute meta which are otherwise compressed)

All 3 bundles are generated using the same index file in lib/index.js.

For v1.14.0, plotly.min.js includes 14 trace modules and weighs a hefty 1.17 MB. So, it goes without saying that we should start distributing partial bundles. Determining how to split our modules into partial bundles isn't as obvious though.

I propose:

  • plotly.js, plotly.min.js and plotly-with-meta.js will always include all non-beta modules
  • plotly-basic.js would include scatter, bar and pie
  • plotly-cartesian would include all cartesian and ternary trace types
  • plotly-geo would include all geo trace types
  • plotly-gl3d.js would include all gl3d trace types
  • plotly-gl2d.js would include all gl2d trace types
  • or maybe a plotly-gl.js that would combine all gl3d and gl2d trace types
  • plotly-mapbox.js would include all mapbox trace types

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