mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-18 21:16:47 +00:00
2b11990063
* refactor(settings): load the GL map preview on demand MapViewGL and JourneyMapGL are both behind lazy() so a Leaflet-only install never downloads the GL engines. MapboxPreview imported mapbox-gl and maplibre-gl statically, which put them back in the entry chunk and cancelled that out. Wrap it in lazy()/Suspense on both the desktop tab and the mobile screen. The entry chunk drops from 7987 kB to 5157 kB (2057 kB to 1292 kB gzipped); the engines now ship as their own chunk, loaded when a GL provider is picked. The preview no longer resolves synchronously, so the tests that read it right after switching provider await it now. * chore(client): drop unused deps, self-host MuseoModerno, add a bundle baseline @react-pdf/renderer, react-window and @types/react-window have no importers anywhere: TripPDF builds HTML for the browser print window and JourneyBookPDF goes through marked. RegisterPage is dead too, /register renders LoginPage. MuseoModerno was the last font still coming from the Google CDN through a render-blocking <link>, while main.tsx already self-hosts Poppins and Geist for exactly the reason stated in the comment there. Same weights, now bundled. Add rollup-plugin-visualizer behind `npm run build:analyze` so the splitting work has numbers to argue with, pin build.target instead of inheriting Vite's default, and bring the workbox size ceiling down from 10 MB to 6 MB — anything above it is dropped from the precache manifest silently, which only shows up as a broken offline app.
29 lines
1.1 KiB
HTML
29 lines
1.1 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover" />
|
|
<title>TREK</title>
|
|
|
|
<!-- Pre-paint appearance (FOUC fix). External classic script so it runs
|
|
before first paint AND complies with the prod CSP (script-src 'self'). -->
|
|
<script src="/theme-boot.js"></script>
|
|
|
|
<!-- PWA / iOS -->
|
|
<meta name="theme-color" content="#09090b" />
|
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
|
<meta name="apple-mobile-web-app-status-bar-style" content="default" />
|
|
<meta name="apple-mobile-web-app-title" content="TREK" />
|
|
<link rel="apple-touch-icon" href="/icons/apple-touch-icon-180x180.png" />
|
|
|
|
<!-- Favicon -->
|
|
<link rel="icon" type="image/svg+xml" href="/icons/icon.svg" />
|
|
|
|
<!-- Fonts are bundled from @fontsource in src/main.tsx, see the note there. -->
|
|
</head>
|
|
<body>
|
|
<div id="root"></div>
|
|
<script type="module" src="/src/main.tsx"></script>
|
|
</body>
|
|
</html>
|