Skip to content

Commit ed13174

Browse files
committed
fix(asset): asset handling error when hot reloading
1 parent 583c318 commit ed13174

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/plugins/asset.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ export default function assetPlugin(): Plugin {
6868
name: 'vite:node-asset',
6969
apply: 'build',
7070
enforce: 'pre',
71+
buildStart(): void {
72+
publicAssetPathCache.clear()
73+
assetCache.clear()
74+
},
7175
configResolved(config): void {
7276
sourcemap = config.build.sourcemap
7377
publicDir = normalizePath(config.publicDir)

0 commit comments

Comments
 (0)