{stops.length === 0 && !loading && (
No stops for this day.
)}
diff --git a/vite.config.ts b/vite.config.ts
index d2c7811..eaabdb4 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -57,6 +57,23 @@ export default defineConfig({
},
},
},
+ {
+ // OpenStreetMap raster tiles for the Route Planner map. CacheFirst so
+ // tiles pre-warmed for a route render offline during the day. Capped
+ // entries + 7-day TTL keep the cache bounded.
+ urlPattern: /^https:\/\/[abc]\.tile\.openstreetmap\.org\/.*\.png$/i,
+ handler: "CacheFirst",
+ options: {
+ cacheName: "osm-tiles",
+ expiration: {
+ maxEntries: 400,
+ maxAgeSeconds: 60 * 60 * 24 * 7, // 7 days
+ },
+ cacheableResponse: {
+ statuses: [0, 200],
+ },
+ },
+ },
],
},
}),