Skip to content

Commit

Permalink
fix(esbuild): check server before reload tsconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy committed Jan 19, 2023
1 parent a65d31b commit 7112d7a
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 7112d7a

Please sign in to comment.