Skip to content

Commit 9d97b6d

Browse files
authored
fix: data-uri plugin cache reset at buildStart (#3537)
1 parent e344cdd commit 9d97b6d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

packages/vite/src/node/plugins/dataUri.ts

+7-2
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,17 @@ const dataUriPrefix = `/@data-uri/`
1212
* Build only, since importing from a data URI works natively.
1313
*/
1414
export function dataURIPlugin(): Plugin {
15-
const resolved: {
15+
let resolved: {
1616
[key: string]: string
17-
} = {}
17+
}
1818

1919
return {
2020
name: 'vite:data-uri',
21+
22+
buildStart() {
23+
resolved = {}
24+
},
25+
2126
resolveId(id) {
2227
if (!dataUriRE.test(id)) {
2328
return null

0 commit comments

Comments
 (0)