Hi, I have the same problem as you, and was hoping you could elaborate more on your solution. Essentially I have an electron app I am building that started out as a simple Vue webapp that I later converted to an electron app using vue-cli-electron-builder plugin.
I am displaying graphs and charts and so I am using poltly.js-dist to do so, and everything works fine when I simply run the serve command, however, when I build using the electron:build command I get the same error as you regarding the undefined property in plotly.
I can’t seem to find a tutorial on how to solve this, and am hoping you can help as a last resort before I switch over to the more complex D3.