mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-18 00:02:28 +08:00
fix(server): some dist assets not served properly
This commit is contained in:
parent
dd73517e7f
commit
83058e91b0
@ -35,9 +35,9 @@ async function register(app: express.Application) {
|
|||||||
url = url.replace(/^\/src/, "");
|
url = url.replace(/^\/src/, "");
|
||||||
if (!url.startsWith("/@")) {
|
if (!url.startsWith("/@")) {
|
||||||
url = "/src" + url;
|
url = "/src" + url;
|
||||||
|
url = url.replace(/\.js$/, ".ts");
|
||||||
}
|
}
|
||||||
url = `/${assetPath}/app${url}`;
|
url = `/${assetPath}/app${url}`;
|
||||||
url = url.replace(/\.js$/, ".ts");
|
|
||||||
console.log(`${req.url} => ${publicUrl}${url}`);
|
console.log(`${req.url} => ${publicUrl}${url}`);
|
||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user