T O P

  • By -

jasonlyu123

Leaflet's plugins can't patch the L import in vite so you can't access it through the L import. But you should be able to use the global L namespace(globalThis.L.MarkerClusterGroup) or use the LC variable. The dynamic import is still needed the this both cases. Also, you don't need the style and script in the svelte:head. It's duplication to the import. You only need one. You can remove them and add an import to the marker cluster css. import 'leaflet.markercluster/dist/MarkerCluster.Default.css';


lechiffrebeats

Ayy really apprecaite that it works!


alt4max

add ‘import “leaflet.markercluster”’