mime-types icon indicating copy to clipboard operation
mime-types copied to clipboard

lookup("map") returns "application/json" instead of false

Open mkilpatrick opened this issue 1 year ago • 4 comments

For some reason lookup("map") returns 'application/json' instead of false. Shouldn't it return false since there is no extension?

mkilpatrick avatar Jun 12 '24 19:06 mkilpatrick

custom-types.json in mime-db

djereg avatar Jun 14 '24 11:06 djereg

So an extension (.) isn't necessary for its determination?

mkilpatrick avatar Jun 14 '24 14:06 mkilpatrick

As you can see in readme the first example is json without dot and the result is application/json.

djereg avatar Jun 14 '24 15:06 djereg

application/json is the best mimetype for sourcemap files.

application/octet-stream might work well with browser devtools, however this mimetype is a signal to browsers to initiate a download. This may cause problems for tools like performance analysis tooling or JS exception tracking that attempt to make sense of the source maps.

akashamar avatar Jul 21 '24 11:07 akashamar