fix: eager-load the map and harden native boot cleanup

This commit is contained in:
SkateSpots 2026-10-30 01:19:19 +07:00
parent c66aeb526f
commit e234253870

View file

@ -7,9 +7,9 @@ import { DeepLinkHandler } from "./components/DeepLinkHandler";
import { RouteErrorBoundary } from "./components/RouteErrorBoundary";
import { Layout } from "./components/Layout";
// The map is the homepage, but lazy-loading it keeps its chunk (plus the
// IndexedDB offline-cache layer) out of the initial entry bundle.
const MapPage = lazyWithRetry(() => import("./pages/MapPage"));
// MapPage is eager: it is the homepage and a lazy import here used to leave a
// blank Suspense fallback on slow native WebViews before the map appeared.
import MapPage from "./pages/MapPage";
// Lazy load everything else — each page becomes its own JS chunk
const Index = lazyWithRetry(() => import("./pages/Index"));