Skip to content

Commit

Permalink
feat: add .pdf to list of known asset types (vitejs#4752)
Browse files Browse the repository at this point in the history
  • Loading branch information
brillout authored and aleclarson committed Nov 8, 2021
1 parent 0873531 commit 3f34fd4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/vite/client.d.ts
Expand Up @@ -161,6 +161,10 @@ declare module '*.webmanifest' {
const src: string
export default src
}
declare module '*.pdf' {
const src: string
export default src
}

// web worker
declare module '*?worker' {
Expand Down
3 changes: 2 additions & 1 deletion packages/vite/src/node/constants.ts
Expand Up @@ -76,7 +76,8 @@ export const KNOWN_ASSET_TYPES = [

// other
'wasm',
'webmanifest'
'webmanifest',
'pdf'
]

export const DEFAULT_ASSETS_RE = new RegExp(
Expand Down

0 comments on commit 3f34fd4

Please sign in to comment.