Skip to content

Commit

Permalink
fix: data-uri plugin cache reset at buildStart (#3537)
Browse files Browse the repository at this point in the history
  • Loading branch information
patak-dev authored May 25, 2021
1 parent e344cdd commit 9d97b6d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/vite/src/node/plugins/dataUri.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,17 @@ const dataUriPrefix = `/@data-uri/`
* Build only, since importing from a data URI works natively.
*/
export function dataURIPlugin(): Plugin {
const resolved: {
let resolved: {
[key: string]: string
} = {}
}

return {
name: 'vite:data-uri',

buildStart() {
resolved = {}
},

resolveId(id) {
if (!dataUriRE.test(id)) {
return null
Expand Down

0 comments on commit 9d97b6d

Please sign in to comment.