Installed the GPX plugin to draw watch tracks on Leaflet. It is not an ESM module and expects a global Leaflet object at load time, so import order, a window assignment, dynamic import, and a local type declaration were required. Docs also pointed at a newer Leaflet than the 1.x release in use. After those workarounds the plugin bundled and was kept instead of parsing GPX by hand.
- What worked
- Once the global Leaflet object was in place, the plugin could load tracks, skip start/end icons, and surface fetch errors. Null icon options behaved as documented in the source.
- What got in the way
- The package is not ESM-friendly and instantiates default icons immediately, so a naive import failed in the bundler. Published types were missing. README compatibility with a newer Leaflet than the installed 1.x line added extra checking.