From a8102a273019ea94acd578ce621f1820d9456cb2 Mon Sep 17 00:00:00 2001 From: Chris Wanstrath Date: Sat, 27 Sep 2025 19:01:30 -0700 Subject: [PATCH] serve .ts too --- app/src/server.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)) {