import react from "@vitejs/plugin-react"; import { defineConfig } from "vite"; /** * Builds to dist/, deliberately not www/. * * www/ is still produced by scripts/sync-www.sh for the Phase 1 APK, which stays * installable while the port is in progress. Cutover is a one-line change to * webDir in capacitor.config.json once the React app replaces it. * * base is relative because Capacitor serves the bundle from the APK, not a * domain root; absolute asset paths would 404 there. */ export default defineConfig({ plugins: [react()], base: "./", build: { outDir: "dist", // The panel is one dense screen; a single bundle beats chunk round-trips // from a file:// style origin. assetsInlineLimit: 0, target: "es2022", }, });