| 61 | |
| 62 | // add own dictionary entry by directly assigning mrmime |
| 63 | export function registerCustomMime(): void { |
| 64 | // https://github.com/lukeed/mrmime/issues/3 |
| 65 | // instead of `image/vnd.microsoft.icon` which is registered on IANA Media Types DB |
| 66 | // image/x-icon should be used instead for better compatibility (https://github.com/h5bp/html5-boilerplate/issues/219) |
| 67 | mrmime.mimes.ico = 'image/x-icon' |
| 68 | // https://mimesniff.spec.whatwg.org/#matching-an-image-type-pattern |
| 69 | mrmime.mimes.cur = 'image/x-icon' |
| 70 | // https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Containers#flac |
| 71 | mrmime.mimes.flac = 'audio/flac' |
| 72 | // https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types |
| 73 | mrmime.mimes.eot = 'application/vnd.ms-fontobject' |
| 74 | } |
| 75 | |
| 76 | export function renderAssetUrlInJS( |
| 77 | pluginContext: PluginContext, |