2026-04-20 04:47:44 +00:00
|
|
|
import { defineConfig } from 'vite'
|
|
|
|
|
import react from '@vitejs/plugin-react'
|
|
|
|
|
|
|
|
|
|
export default defineConfig({
|
|
|
|
|
plugins: [react()],
|
feat: search, multi-stop routing, and route display
Full navigation UI with:
- Search bar with 150ms debounced autocomplete from /api/geocode
- Keyboard navigation (arrow keys, Enter, Escape)
- Exact match badge for verified address results
- Multi-stop list with drag-to-reorder (dnd-kit)
- 10-stop cap with disabled state
- Mode selector (drive/walk/bike)
- Valhalla route display with per-leg color polyline
- Maneuver list with instructions, distance, time remaining
- Click maneuver to fly map to that point
- Optimize stops button (3+ stops, uses /optimized_route)
- Responsive: side panel (desktop ≥768px), bottom sheet (mobile)
- Stop pins: green origin, red destination, blue intermediate
- Pin popup with remove button
- Geolocation permission requested on first route, not on load
- Error handling for unroutable pairs
- nginx proxy for /api/ and /valhalla/ endpoints
Dependencies added: zustand, @dnd-kit/core, @dnd-kit/sortable,
@dnd-kit/utilities
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-20 16:50:53 +00:00
|
|
|
server: {
|
|
|
|
|
proxy: {
|
|
|
|
|
'/api': 'http://100.64.0.24:8420',
|
|
|
|
|
'/valhalla': {
|
|
|
|
|
target: 'http://100.64.0.24:8002',
|
|
|
|
|
rewrite: (path) => path.replace(/^\/valhalla/, ''),
|
|
|
|
|
},
|
|
|
|
|
'/tiles': 'http://100.64.0.24:8420',
|
|
|
|
|
},
|
|
|
|
|
},
|
2026-04-20 04:47:44 +00:00
|
|
|
})
|