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:
@@ -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> = {
|
||||
|
||||
Reference in New Issue
Block a user