ol-cesium-webpack-example
ol-cesium-webpack-example copied to clipboard
Cesium is undefined - can we get ol-cesium to work with the current version of cesium?
A fresh clone of this repository results in an error:
Uncaught TypeError: Cannot read property 'Scene' of undefined
at new e (cesium.js:325738)
at Object.<anonymous> (cesium.js:305272)
at __webpack_require__ (cesium.js:55)
at Object.<anonymous> (cesium.js:349102)
at __webpack_require__ (cesium.js:55)
at webpackJsonpCallback (cesium.js:26)
at app.js:1
This is likely because cesium has moved to ES6 modules in version 1.63.
From package-lock.json:
"cesium": {
"version": "1.63.0",
"resolved": "https://registry.npmjs.org/cesium/-/cesium-1.63.0.tgz",
"integrity": "sha512-hOTw9LQsKqrNRAaIzUDfA6vqZJv+AgOpxO+xWmTCApez0S+NpVE7h/5UqcIeNOYoT0qj4UThFCt1aWm0ioCBDw==",
"dev": true,
"requires": {
"esm": "^3.2.25"
}
},
Indeed, building the repo with cesium version 1.47 works fine.
Is there any way to get ol-cesium to work with the current version of cesium?