Open Code-Hex opened 9 months ago
Hi @Code-Hex!
This issue arises because serve-static
identifies .ts
files as video/mp2t
:
https://github.com/honojs/hono/blob/b1581430754d8ec6a340a781beaaefb985a4057a/src/utils/mime.ts#L71
I believe it's better to maintain this specification in serve-static
. Alternatively, we can have the @hono/esbuild-transpiler
set the correct content type for .ts
files.
Hi 👋
I tried using
@hono/esbuild-transpiler
. I'm using Cloudflare Workers and confirmed it withwrangler dev
. When returning a.ts
file from the server, it comes back with acontent-type
ofvideo/mp2t
.