Files
fusion/packages/dashboard/capacitor.config.ts
gsxdsm 6cbce7acbd feat(FN-1090): add Capacitor mobile setup for dashboard
- Add Capacitor dependencies and dashboard scripts for sync, open, run, and mobile preparation
- Add a typed dashboard capacitor.config.ts with dist/client webDir and FUSION_BACKEND_URL server override
- Add Vitest coverage for Capacitor config shape, app identity, webDir, cleartext mode, and env URL behavior
- Ignore generated iOS/Android platform directories and document the end-to-end mobile workflow in the dashboard README
2026-04-07 18:52:07 -07:00

30 lines
927 B
TypeScript

import type { CapacitorConfig } from "@capacitor/cli";
const config: CapacitorConfig = {
appId: "com.fusion.dashboard",
appName: "Fusion",
webDir: "dist/client",
server: {
// In development, override url to connect to the Fusion backend.
// Set FUSION_BACKEND_URL env var before running cap sync/run.
// Example: FUSION_BACKEND_URL=http://192.168.1.100:4040 pnpm cap:run:ios
//
// In production, the app serves static assets from webDir and connects
// to the backend at the configured server url.
url: process.env.FUSION_BACKEND_URL || undefined,
cleartext: true, // Allow HTTP connections to local dev servers
},
plugins: {
SplashScreen: {
launchAutoHide: true,
backgroundColor: "#0a0a0a",
showSpinner: true,
spinnerColor: "#6366f1",
androidSplashAssetName: "splash",
androidScaleType: "CENTER_CROP",
},
},
};
export default config;