Unfortunately the example Electron app shown in the blog post below didn't have the issue so I'm assuming it's something more like the combination of React and/or Webpack in combination with Electron.
https://cesium.com/blog/2016/04/04/an-introduction-to-cesium-desktop-apps-with-electron/
I need to run my own web worker code with node integration in Electron, but setting the value causes Cesium to fail in our setup (which is obviously complicated). We're using npm: ces...@1.42.1, Win10 x64, Electron 1.8.1 (Chrome 59.0.3071.115).
The fix was to simply set the following line near the start of the minified cesiumWorkerBootstrapper.js from:
var requirejs, require, define;
to
var requirejs = undefined, require = undefined, define = undefined;
Whilst the original code probably exists to avoid multiple redefines of require, in cesium's web worker context it should be fine to explicitly reset the variables to undefined as they're isolated, thus fixing the issue here and not affecting existing consumers.
If I'm on the right track, any chance this could be changed upstream? If I've grossly misinterpreted the situation, please let me know what ramifications this may have :)
amd: {
// Enable webpack-friendly use of require in Cesium
toUrlUndefined: true
},Enter code here...Yep followed everything in that tutorial and I double-checked my webpack config just in case. It definitely didn't work without the config shown in that tutorial so the current issue is something else unfortunately.
Cheers,
Stuart
--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/jZ8s9UOVKBM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cesium-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.