Skip to content

Commit

Permalink
feat: add .pdf to list of known asset types (#4752)
Browse files Browse the repository at this point in the history
  • Loading branch information
brillout committed Aug 27, 2021
1 parent c287c20 commit d891641
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 d891641

Please sign in to comment.