diff --git a/app/src/server.tsx b/app/src/server.tsx index 3692c0e..6cd8ba3 100644 --- a/app/src/server.tsx +++ b/app/src/server.tsx @@ -42,8 +42,8 @@ app.use("*", async (c, next) => { app.on("GET", ["/js/:path{.+}", "/shared/:path{.+}"], async c => { const path = "./src/" + c.req.path.replace("..", ".") - // path must end in .js - if (!path.endsWith(".js")) return c.text("File not found", 404) + // path must end in .js or .ts + if (!path.endsWith(".js") && !path.endsWith(".ts")) return c.text("File not found", 404) const ts = path.replace(".js", ".ts") if (isFile(ts)) {