Closed zsakowitz closed 2 years ago
Hi @zsakowitz and thank you for your issue. This module only provides a list of mime types that has a property of extensions associated with that mime type. You can find the list of where the data is sourced from in the README and instructions for how to get a new mime type (and thus extensions) added. Please check out https://github.com/jshttp/mime-db#contributing
Currently,
.ts
maps tovideo/mp2t
,.mts
maps tomodel/vnd.mts
, and.tsx
and.cts
aren't in the database.TypeScript uses these extensions:
.ts
is a standard TypeScript file (currentlyvideo/mp2t
, should betext/typescript
).tsx
is a TypeScript + JSX file (should betext/tsx
).mts
compiles to a.mjs
file and always runs as an ES module (currentlymodel/vnd.mts
, should betext/typescript
).cts
compiles to a.cjs
file and always runs as a CommonJS module (should betext/typescript
)I think that modifying these would be helpful to the user base and fix issues with static file servers thinking TypeScript files are videos. It would also be nice if
.ts
could both bevideo/mp2t
andtext/typescript
, but I'm not sure what the opinion is on that.