I’m trying to run the planesource (vtk.js) example in an electron app. After 2 days of trying out different boilerplates and following different guides I still can’t get vtk to run the example within electron.
This repo uses the new @kitware/vtk.js ESM build, so FYI there are no docs on it (yet). In addition, I’ve left out the control panel that you typically see with that example, since I was being hasty and didn’t want to bring in the html-loader rules.
The general gist of this is that you need to import and use vtk.js inside the renderer process. In addition, be sure to tell webpack to use source-map devtool, otherwise you encounter a CSP error.