From 1780700091109a4294d1b70b9a0512cf45384694 Mon Sep 17 00:00:00 2001 From: Evan Boehs Date: Sun, 26 Dec 2021 17:14:50 -0500 Subject: [PATCH 1/2] Update constants.ts --- packages/vite/src/node/constants.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/vite/src/node/constants.ts b/packages/vite/src/node/constants.ts index e19ab1eea5fa51..9612cd8c96460d 100644 --- a/packages/vite/src/node/constants.ts +++ b/packages/vite/src/node/constants.ts @@ -83,7 +83,8 @@ export const KNOWN_ASSET_TYPES = [ // other 'wasm', 'webmanifest', - 'pdf' + 'pdf', + 'txt' ] export const DEFAULT_ASSETS_RE = new RegExp( From efc9b776328e32c3284c9595be764ad758988dd7 Mon Sep 17 00:00:00 2001 From: Evan Boehs Date: Sun, 16 Jan 2022 16:58:11 -0500 Subject: [PATCH 2/2] fix: add txt file format typings --- packages/vite/client.d.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/vite/client.d.ts b/packages/vite/client.d.ts index 2586f07816cade..aaac1ea986251d 100644 --- a/packages/vite/client.d.ts +++ b/packages/vite/client.d.ts @@ -165,6 +165,10 @@ declare module '*.pdf' { const src: string export default src } +declare module '*.txt' { + const src: string + export default src +} // web worker declare module '*?worker' {