Closed Cre3per closed 1 year ago
I'd like to work on this.
There is no 1:1 mapping between file extensions and mime types, eg. application/typescript
and text/typescript
both have a ".ts" file extension. For a start, I'll write a mapping function based on the mime types in from_content_type()
Sounds good to me!
https://github.com/denoland/deno/pull/17172 adds
--ext
to deno, eg.--ext
needs to map file extensions to mime typesThe mapping function in deno is incomplete and temporary.
deno_ast's
MediaType
already maps module specifiers and mime types toMediaType
. I think this is a good place to mapMediaType
MediaType
to mime types