mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-02 05:02:27 +08:00
fix(server): package.json not accessible
This commit is contained in:
parent
83058e91b0
commit
b678e4ea28
@ -34,7 +34,9 @@ async function register(app: express.Application) {
|
|||||||
let url = req.url;
|
let url = req.url;
|
||||||
url = url.replace(/^\/src/, "");
|
url = url.replace(/^\/src/, "");
|
||||||
if (!url.startsWith("/@")) {
|
if (!url.startsWith("/@")) {
|
||||||
url = "/src" + url;
|
if (!url.startsWith("/package.json")) {
|
||||||
|
url = "/src" + url;
|
||||||
|
}
|
||||||
url = url.replace(/\.js$/, ".ts");
|
url = url.replace(/\.js$/, ".ts");
|
||||||
}
|
}
|
||||||
url = `/${assetPath}/app${url}`;
|
url = `/${assetPath}/app${url}`;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user