Bundle strategy

Choose how Plotly.js loads

Use exactly one integration module. The right option depends on whether your application prioritizes simple bundling, bundle size, or control over script delivery.

02

Plotly CDN

Let the library insert a pinned Plotly CDN script. Choose a smaller named bundle when your chart types allow it.

Best for
Smaller application bundles
Network at runtime
Required
03

Browser window

Use a Plotly instance already exposed on window.Plotly, useful when the host page owns script loading.

Best for
Existing script pipelines
Network at runtime
Host-controlled

Important

Do not combine loading modules

Each strategy provides the same Plotly service contract. Configure only one in an application and pin the Plotly.js version for reproducible behavior.

Read the complete loading documentation