Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mkilpatrick opened this issue Jun 12, 2024 · 4 comments
Open

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

mkilpatrick opened this issue Jun 12, 2024 · 4 comments

Comments

@mkilpatrick
Copy link

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

@djereg
Copy link

djereg commented Jun 14, 2024

custom-types.json in mime-db

@mkilpatrick
Copy link
Author

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

@djereg
Copy link

djereg commented Jun 14, 2024

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

@akashamar
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants