Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix(server): serve the manifest and icons from the client dir in dev
Elian Doran85418e8ca49e
diff --git a/apps/server/src/app.ts b/apps/server/src/app.tsindex 2ffb29dc15..782459cc0d 100644--- a/apps/server/src/app.ts+++ b/apps/server/src/app.ts@@ -11,7 +11,7 @@ import path from "path";import favicon from "serve-favicon";import type serveStatic from "serve-static";-import assets from "./routes/assets.js";+import assets, { getClientDir } from "./routes/assets.js";import custom from "./routes/custom.js";import error_handlers from "./routes/error_handlers.js";import mcpRoutes from "./routes/mcp.js";@@ -31,7 +31,8 @@ export default async function buildApp() {const app = express();const publicDir = isDev ? path.join(getResourceDir(), "../dist/public") : path.join(getResourceDir(), "public");- const publicAssetsDir = path.join(publicDir, "assets");+ // The client source dir in dev, where `dist/public` is not rebuilt; the built `public` dir otherwise.+ const publicAssetsDir = path.join(getClientDir(), "assets");const assetsDir = RESOURCE_DIR;// view engine setup