diff --git a/index.html b/index.html index 59ca398..332624c 100644 --- a/index.html +++ b/index.html @@ -46,6 +46,58 @@
+ + + + diff --git a/src/main.tsx b/src/main.tsx index 030638b..b733dfa 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -81,3 +81,11 @@ createRoot(document.getElementById("root")!).render( ); + +// Tell the boot crash guard (in index.html) that the app mounted successfully, +// so its "did not render" timeout doesn't fire. +try { + (window as unknown as { __SKATESPOTS_BOOTED__?: () => void }).__SKATESPOTS_BOOTED__?.(); +} catch { + /* no-op */ +} diff --git a/vite.config.ts b/vite.config.ts index 88ae21c..d90f576 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -5,6 +5,11 @@ import { defineConfig } from "vitest/config"; // https://vitejs.dev/config/ export default defineConfig(() => ({ + // In a native Capacitor WebView the bundle is served from the local + // filesystem, so assets must be referenced with RELATIVE paths ('./…'). + // Absolute '/…' paths are the classic cause of a white screen on device. + // The regular web deploy keeps '/' (served from a domain root). + base: process.env.CAPACITOR_BUILD ? './' : '/', server: { host: "::", port: 8080,