From a56e3dd03a3c9e83ee3df77b007c5ea892899d80 Mon Sep 17 00:00:00 2001 From: Alex Kozack Date: Mon, 13 Jun 2022 13:58:55 +0300 Subject: [PATCH] fix(vite): add missed image asset types --- packages/vite/client.d.ts | 12 ++++++++++++ packages/vite/src/node/constants.ts | 3 +++ 2 files changed, 15 insertions(+) diff --git a/packages/vite/client.d.ts b/packages/vite/client.d.ts index 948d66d1d7ad74..e99b4a526b7a58 100644 --- a/packages/vite/client.d.ts +++ b/packages/vite/client.d.ts @@ -74,6 +74,18 @@ declare module '*.jpeg' { const src: string export default src } +declare module '*.jfif' { + const src: string + export default src +} +declare module '*.pjpeg' { + const src: string + export default src +} +declare module '*.pjp' { + const src: string + export default src +} declare module '*.png' { const src: string export default src diff --git a/packages/vite/src/node/constants.ts b/packages/vite/src/node/constants.ts index 4e5d3da96f50da..09b8c314149b03 100644 --- a/packages/vite/src/node/constants.ts +++ b/packages/vite/src/node/constants.ts @@ -67,6 +67,9 @@ export const KNOWN_ASSET_TYPES = [ // images 'png', 'jpe?g', + 'jfif', + 'pjpeg', + 'pjp', 'gif', 'svg', 'ico',