We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
import.meta.hot.prune
1 parent 9f32b1d commit 98a3484Copy full SHA for 98a3484
packages/vite/src/shared/hmr.ts
@@ -219,12 +219,14 @@ export class HMRClient {
219
if (disposer) return disposer(this.dataMap.get(path))
220
}),
221
)
222
- paths.forEach((path) => {
223
- const fn = this.pruneMap.get(path)
224
- if (fn) {
225
- fn(this.dataMap.get(path))
226
- }
227
- })
+ await Promise.all(
+ paths.map((path) => {
+ const fn = this.pruneMap.get(path)
+ if (fn) {
+ return fn(this.dataMap.get(path))
+ }
228
+ }),
229
+ )
230
}
231
232
protected warnFailedUpdate(err: Error, path: string | string[]): void {
0 commit comments