import L from 'leaflet'; import 'leaflet/dist/leaflet.css'; // Correction des icônes Leaflet avec Vite (les chemins par défaut ne fonctionnent pas avec bundler) import markerIcon2x from 'leaflet/dist/images/marker-icon-2x.png'; import markerIcon from 'leaflet/dist/images/marker-icon.png'; import markerShadow from 'leaflet/dist/images/marker-shadow.png'; delete L.Icon.Default.prototype._getIconUrl; L.Icon.Default.mergeOptions({ iconRetinaUrl: markerIcon2x, iconUrl: markerIcon, shadowUrl: markerShadow, }); window.LeafletMap = L;