diff --git a/public/images/user-location.png b/public/images/user-location.png deleted file mode 100644 index a785ca7..0000000 Binary files a/public/images/user-location.png and /dev/null differ diff --git a/src/components/SpotMap.tsx b/src/components/SpotMap.tsx index c20d8f8..b27c80b 100644 --- a/src/components/SpotMap.tsx +++ b/src/components/SpotMap.tsx @@ -191,7 +191,9 @@ const createShopIcon = () => L.divIcon({ // with a pulsing accuracy halo (Google-Maps-style, brand-flavored). const createUserLocationIcon = () => { // BASE_URL resolves correctly for both web ('/') and the Capacitor APK ('./'). - const logoUrl = `${import.meta.env.BASE_URL}images/user-location.png`; + // Reuse the small (~24 KB) brand logo for the marker instead of the old + // 2.9 MB user-location.png — same artwork, ~99% smaller payload. + const logoUrl = `${import.meta.env.BASE_URL}images/logo.png`; return L.divIcon({ className: 'user-location-marker', html: ` diff --git a/vite.config.ts b/vite.config.ts index 731ad78..dd04b5a 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -92,6 +92,20 @@ export default defineConfig(() => ({ if (id.includes('leaflet') || id.includes('ngeohash')) { return 'vendor-map'; } + // Media — hls.js is large (~500KB) and only used by the radio/video + // players. Split it so the map homepage never downloads it. + if (id.includes('hls.js')) { + return 'vendor-media'; + } + // QR scanning — html5-qrcode (~300KB) is only used in wallet/scan + // flows; keep it out of the initial payload. + if (id.includes('html5-qrcode') || id.includes('qrcode')) { + return 'vendor-qr'; + } + // Charts — recharts (~400KB) is only used on stats pages. + if (id.includes('recharts') || id.includes('d3-')) { + return 'vendor-charts'; + } // Nostr core — changes infrequently, worth caching separately if (id.includes('nostr-tools') || id.includes('@nostrify') || id.includes('@noble')) { return 'vendor-nostr';