An alternative to https://github.com/mysociety/local-intelligence-hub/pull/586, where we switch to importing Leaflet as one big module, rather than importing the Map, GeoJSON, and Icon classes individually, which means that Icon.Default.imagePath (or, now, in our case, L.Icon.Default.imagePath) works.
I don’t know whether importing * from leaflet, rather than importing a handful of classes individually, will increase the size of our compiled CSS – I guess we should check.
An alternative to https://github.com/mysociety/local-intelligence-hub/pull/586, where we switch to importing Leaflet as one big module, rather than importing the
Map
,GeoJSON
, andIcon
classes individually, which means thatIcon.Default.imagePath
(or, now, in our case,L.Icon.Default.imagePath
) works.This feels like a better solution than https://github.com/mysociety/local-intelligence-hub/pull/586, which relies on what appears to be a deprecated bit of
Leaflet.Icon.Default._getIconUrl
.I don’t know whether importing
*
from leaflet, rather than importing a handful of classes individually, will increase the size of our compiled CSS – I guess we should check.