Open homerokzam opened 3 years ago
I have the same problem
I found a way to fix the problem:
npm i worker-loader
Then:
import mapboxgl from 'mapbox-gl';
export default function Map() {
mapboxgl.workerClass = require('worker-loader!mapbox-gl/dist/mapbox-gl-csp-worker').default;
...
I stumbled upon the same issue, my production app is hosted on AWS S3, and only there the error occurs. I couldn't figure out how you solved the error, could you help me? I'm using react-map-gl v5.2.0
.
Describe the bug An error occurred while parsing the WebWorker bundle. This is most likely due to improper transpilation by Babel; please see https://docs.mapbox.com/mapbox-gl-js/api/#transpiling-v2
The error started to happen after updating the @urbica/react-map-gl lib
To Reproduce Occurs only after publishing to server (docker). Running locally the error does not occur.
Screenshots
Desktop (please complete the following information):