Skip to content

Commit

Permalink
fix: check server after tsconfig reload (#9106)
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy committed Jul 14, 2022
1 parent b393451 commit d12d469
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions packages/vite/src/node/plugins/esbuild.ts
Expand Up @@ -437,11 +437,14 @@ function reloadOnTsconfigChange(changedFile: string) {

// reset tsconfck so that recompile works with up2date configs
initTSConfck(server.config).finally(() => {
// force full reload
server.ws.send({
type: 'full-reload',
path: '*'
})
// server may not be available if vite config is updated at the same time
if (server) {
// force full reload
server.ws.send({
type: 'full-reload',
path: '*'
})
}
})
}
}

0 comments on commit d12d469

Please sign in to comment.