google/playground-elements

Use filetypes over mime-types for syntax highlighting

taylor-vann opened this issue · 0 comments

Non traditional types like tsx default to the application/octect-stream mime-type. During a fetch (initial load) tsx will have a mime-type of application/octect-stream and will not have syntax highlights as a consequence.

Currently, we use mime-types to infer syntax highlighting. However, servers are less than consistent with mime-types.

It is possible to avoid mime-types entirely and instead highlight by file-type.