The frontend builds into a single 2.1 MB JS chunk (dist/assets/index-*.js), well above Vite's 500 KB warning threshold.
Primary contributors:
- MapBox GL JS (~800KB-1MB minified)
- React + full application code in one bundle
Recommended approach:
- Lazy-load routes/features with dynamic
import()
- Use
build.rollupOptions.output.manualChunks to split vendor libs (MapBox, React) from app code
- Consider lazy-loading MapBox GL only when the map view is active
Priority: Low — optimization task, not a bug. Appropriate when approaching production deployment.