Skip to content

Build your personal knowledge base with Trilium Notes

chore(dx/client): improve startup speed by properly configuring middleware

Elian Doran054c49767842
diff --git a/apps/server/src/routes/assets.ts b/apps/server/src/routes/assets.ts
index 99d5fac726..b076f6db21 100644
--- a/apps/server/src/routes/assets.ts
+++ b/apps/server/src/routes/assets.ts
@@ -23,6 +23,8 @@ async function register(app: express.Application) {
if (isDev) {
const vite = await createViteServer({
+ server: { middlewareMode: true },
+ appType: "custom",
cacheDir: path.join(srcRoot, "../../.cache/vite"),
base: `/${assetUrlFragment}/`,
root: path.join(srcRoot, "../client"),