nathan-gs / ha-map-card

A Map Card for Home Assistant
https://community.home-assistant.io/t/map-card-a-slightly-improved-map-card/693088
MIT License
15 stars 4 forks source link

Should we bundle HA provided dependencies? #53

Open nathan-gs opened 1 month ago

nathan-gs commented 1 month ago

Currently we include leaflet and lit in our generated map-card.js, I wonder if it would be better to leave them out given HomeAssistant provides these anyway.

WDYT @thybag?

thybag commented 1 month ago

It'd probably be nice if we could find a way to do it, as Leaflets quite a bit of the code weight. HA's code splitting tends to make it hard to request specific resources when their internal component isn't on the page so unsure if will be possible. So far as i could see there were very few custom map cards (Aside from your own) out there, otherwise would be tempted to have a peak at how they'd done it.

nathan-gs commented 1 month ago

I believe leaflet can be included directly (as we did before), lit is relatively small.