Black Lives Matter. Please consider donating to Black Girls Code today.

"WebGL is not supported by your browser" for scatter3d on Safari 13.3.1 and Chrome 83.0.4103.106

I want to add a scatter3d plot to my React Plotly app. But I’m getting “WebGL is not supported by your browser - visit for more info” using the latest Safari and Chrome.

Of course my browsers do support WebGL when I visit, and and as suggested in

I suspect it has to do with the fact that I’m using import createPlotlyComponent from "react-plotly.js/factory";, which I have to in order to avoid “JavaScript heap out of memory”, as suggested in

Here’s my sandbox link:

Thank you very much.

Found a workaround following

Add <script crossorigin src=""></script> to index.html, and replace import Plotly from 'plotly.js'; with const Plotly = window.Plotly;

It’s like magic to me. If anyone’s willing to explain what happens in the background, or point me to what I should read, I’d deeply appreciate it.