0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-03-03 09:31:22 -05:00

file_server: use text/typescript instead of application/typescript (#4620)

I just tried it and found that using application/typescript, the browser will download 
the file directly, I think that .ts should be mapped to application/javascript or 
text/typescript
This commit is contained in:
木杉 2020-04-07 22:06:22 +08:00 committed by GitHub
parent e586d0c8b8
commit 481fcfc8bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -47,10 +47,10 @@ const MEDIA_TYPES: Record<string, string> = {
".json": "application/json",
".map": "application/json",
".txt": "text/plain",
".ts": "application/typescript",
".tsx": "application/typescript",
".ts": "text/typescript",
".tsx": "text/tsx",
".js": "application/javascript",
".jsx": "application/jsx",
".jsx": "text/jsx",
".gz": "application/gzip",
};