Skip to content

Build your personal knowledge base with Trilium Notes

fix(server): some dist assets not served properly

Elian Doran83058e91b0f2
diff --git a/apps/server/src/routes/assets.ts b/apps/server/src/routes/assets.ts
index 57f511663f..2cf9771f2d 100644
--- a/apps/server/src/routes/assets.ts
+++ b/apps/server/src/routes/assets.ts
@@ -35,9 +35,9 @@ async function register(app: express.Application) {
url = url.replace(/^\/src/, "");
if (!url.startsWith("/@")) {
url = "/src" + url;
+ url = url.replace(/\.js$/, ".ts");
}
url = `/${assetPath}/app${url}`;
- url = url.replace(/\.js$/, ".ts");
console.log(`${req.url} => ${publicUrl}${url}`);
return url;
}