Closed Anubarak closed 5 months ago
Try import 'mapbox-gl-leaflet'
Thank you - and how can I then use the function?
const gl = mapboxGL({
style: '// some url'
}).addTo(myMap);
throws an error obviously
import * as L from 'leaflet';
L.mapboxGL({ style: '// some url' }).addTo(myMap);
That will eliminate the ability to treeshake the ESM module - the bundle size will be much larger after my tests. So I guess there is no way that supports a smaller bundle size?
How can I actually use this plugin? I tried many different things and searched around the internet, but nothing worked.
is undefined
throws
Cannot read properties of undefined (reading '__esModule')
. I even tried things likeBut nothing worked. Can you please explain me how to use the script?
Edit: or in other words: This is my code, how can I make this working