Skip to content

Commit

Permalink
fix(esbuild): check server before reload tsconfig (#11747)
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy authored Jan 19, 2023
1 parent 193d55c commit c56b954
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/vite/src/node/plugins/esbuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,8 @@ async function loadTsconfigJsonForFile(
}

function reloadOnTsconfigChange(changedFile: string) {
// server could be closed externally after a file change is detected
if (!server) return
// any tsconfig.json that's added in the workspace could be closer to a code file than a previously cached one
// any json file in the tsconfig cache could have been used to compile ts
if (
Expand Down

0 comments on commit c56b954

Please sign in to comment.