8000 fix(hmr): debounce reload · mrauhu/vue-meteor@84ee943 · GitHub
[go: up one dir, main page]

Skip to content

Commit 84ee943

Browse files
author
Guillaume Chau
committed
fix(hmr): debounce reload
1 parent 6921173 commit 84ee943

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/vue-component-dev-client/client/dev-client.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,11 @@ function reload (options) {
6363
console.log(`%cHMR%c ⥁ Client version changed, reload suppressed because of a recent HMR update. You may need to reload the page.`, tagStyle, 'color: #F36E00;')
6464
}
6565
clearTimeout(_suppressTimer)
66+
// Debounce reload with 1 sec. timer
6667
_suppressTimer = setTimeout(() => {
6768
_suppressNextReload = false
6869
_suppressTimer = undefined
69-
})
70+
}, 1000)
7071
} else {
7172
console.log(`%cHMR`, tagStyle, `Reloading app...`)
7273
_reload.call(Reload, options)

0 commit comments

Comments
 (0)
0