fix: make start without public folder

This commit is contained in:
Carlos Florêncio
2026-02-08 18:46:17 +00:00
parent ead9ad75e7
commit b3cba6af00
+13
View File
@@ -86,6 +86,19 @@ export async function runStart({
}
}
// Link public directory (fonts, images, etc.) into standalone output
const webPublicDir = path.join(repoRoot, "apps", "web", "public");
const standalonePublicDir = path.join(webStandaloneDir, "public");
if (fs.existsSync(webPublicDir) && !fs.existsSync(standalonePublicDir)) {
try {
fs.symlinkSync(webPublicDir, standalonePublicDir, "junction");
} catch (err) {
console.warn(
`[kandev] failed to link public assets: ${err instanceof Error ? err.message : String(err)}`,
);
}
}
// Production mode: use warn log level for clean output unless verbose/debug
const showOutput = verbose || debug;
const dbPath = path.join(DATA_DIR, "kandev.db");