fix(ui): correct distDir path — serve React app instead of fallback HTML

server.ts is at src/ui/server.ts, so the dist path needs to go up
two levels (src/ui → src → package root) to reach ui-app/dist/.
Was going up only one level, causing hasDistDir=false and always
falling back to the old embedded DASHBOARD_HTML (no routing).

— 小糯 🐱
This commit is contained in:
2026-04-15 20:36:12 +08:00
parent 25d7700c6b
commit 7e0f417367
+1 -1
View File
@@ -38,7 +38,7 @@ import { DASHBOARD_HTML } from './dashboard.js';
// ── Static file serving ───────────────────────────────────────
const __dirname = dirname(fileURLToPath(import.meta.url));
const distDir = join(__dirname, '..', 'ui-app', 'dist');
const distDir = join(__dirname, '..', '..', 'ui-app', 'dist');
const hasDistDir = existsSync(distDir);
const MIME_TYPES: Record<string, string> = {