Plotly.Phoenix.Plug (plotly_ex v0.3.0)

Copy Markdown View Source

Serves the vendored plotly.js bundle (the offline fallback) from priv/plotly_js/plotly.min.js.

Mount it in your router so the fallback URL resolves:

forward "/plotly_ex", Plotly.Phoenix.Plug

This makes /plotly_ex/plotly.min.js available. The last entry in Plotly.PlotlyJS.source_urls/0 adds a vendored-version query parameter so the immutable browser cache requests a fresh bundle after upgrades.