fix(asset): asset handling error when hot reloading
This commit is contained in:
parent
583c318af1
commit
ed13174829
|
@ -68,6 +68,10 @@ export default function assetPlugin(): Plugin {
|
||||||
name: 'vite:node-asset',
|
name: 'vite:node-asset',
|
||||||
apply: 'build',
|
apply: 'build',
|
||||||
enforce: 'pre',
|
enforce: 'pre',
|
||||||
|
buildStart(): void {
|
||||||
|
publicAssetPathCache.clear()
|
||||||
|
assetCache.clear()
|
||||||
|
},
|
||||||
configResolved(config): void {
|
configResolved(config): void {
|
||||||
sourcemap = config.build.sourcemap
|
sourcemap = config.build.sourcemap
|
||||||
publicDir = normalizePath(config.publicDir)
|
publicDir = normalizePath(config.publicDir)
|
||||||
|
|
Loading…
Reference in a new issue