I've got an issue inside web worker when tried to use @here/maps-api-for-javascript
.
I think that happens since the webpack changes the code that runs inside the web worker.
the initial part of the bundle (mapsjs.bundle.js):
e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {};
after webpack build:
e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof __webpack_require__.g?__webpack_require__.g:"undefined"
In this case inside the web worker, we don't have the __webpack_require__
variable. Looks like I have to configure the webpack to prevent it.
The example from the official site doesn't work too. Same error. https://developer.here.com/documentation/maps/3.1.22.0/dev_guide/topics/get-started-bundling.html
But all works fine if we add the here-maps API as an inline script in HTML.