We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b8da6a6 commit 4b632aeCopy full SHA for 4b632ae
src/index.ts
@@ -88,7 +88,9 @@ function VitePluginRestart(options: VitePluginRestartOptions = {}): Plugin {
88
function handleFileChange(file: string) {
89
if (micromatch.isMatch(file, restartGlobs)) {
90
timerState = 'restart'
91
- server.restart()
+ schedule(() => {
92
+ server.restart()
93
+ })
94
}
95
else if (micromatch.isMatch(file, reloadGlobs) && timerState !== 'restart') {
96
timerState = 'reload'
0 commit comments