mirror of
https://github.com/vitejs/vite.git
synced 2024-11-22 07:09:05 +00:00
feat: add support for .cur type (#18680)
Co-authored-by: sapphi-red <49056869+sapphi-red@users.noreply.github.com>
This commit is contained in:
parent
f07e9b9d01
commit
5ec9eedc80
4
packages/vite/client.d.ts
vendored
4
packages/vite/client.d.ts
vendored
@ -102,6 +102,10 @@ declare module '*.avif' {
|
|||||||
const src: string
|
const src: string
|
||||||
export default src
|
export default src
|
||||||
}
|
}
|
||||||
|
declare module '*.cur' {
|
||||||
|
const src: string
|
||||||
|
export default src
|
||||||
|
}
|
||||||
|
|
||||||
// media
|
// media
|
||||||
declare module '*.mp4' {
|
declare module '*.mp4' {
|
||||||
|
@ -132,6 +132,7 @@ export const KNOWN_ASSET_TYPES = [
|
|||||||
'ico',
|
'ico',
|
||||||
'webp',
|
'webp',
|
||||||
'avif',
|
'avif',
|
||||||
|
'cur',
|
||||||
|
|
||||||
// media
|
// media
|
||||||
'mp4',
|
'mp4',
|
||||||
|
@ -51,6 +51,8 @@ export function registerCustomMime(): void {
|
|||||||
// instead of `image/vnd.microsoft.icon` which is registered on IANA Media Types DB
|
// instead of `image/vnd.microsoft.icon` which is registered on IANA Media Types DB
|
||||||
// image/x-icon should be used instead for better compatibility (https://github.com/h5bp/html5-boilerplate/issues/219)
|
// image/x-icon should be used instead for better compatibility (https://github.com/h5bp/html5-boilerplate/issues/219)
|
||||||
mrmime.mimes['ico'] = 'image/x-icon'
|
mrmime.mimes['ico'] = 'image/x-icon'
|
||||||
|
// https://mimesniff.spec.whatwg.org/#matching-an-image-type-pattern
|
||||||
|
mrmime.mimes['cur'] = 'image/x-icon'
|
||||||
// https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Containers#flac
|
// https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Containers#flac
|
||||||
mrmime.mimes['flac'] = 'audio/flac'
|
mrmime.mimes['flac'] = 'audio/flac'
|
||||||
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types
|
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types
|
||||||
|
Loading…
Reference in New Issue
Block a user