Skip to content

Commit

Permalink
fix(esbuild): handle tsconfck cache undefined (#14650)
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy authored Oct 16, 2023
1 parent 3e264ef commit 4e763c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/vite/src/node/plugins/esbuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ function prettifyMessage(m: Message, code: string): string {
return res + `\n`
}

let tsconfckCache: TSConfckCache<TSConfckParseResult>
let tsconfckCache: TSConfckCache<TSConfckParseResult> | undefined

async function loadTsconfigJsonForFile(
filename: string,
Expand Down Expand Up @@ -518,7 +518,7 @@ async function reloadOnTsconfigChange(changedFile: string) {
server.moduleGraph.invalidateAll()

// reset tsconfck so that recompile works with up2date configs
tsconfckCache.clear()
tsconfckCache?.clear()

// server may not be available if vite config is updated at the same time
if (server) {
Expand Down

0 comments on commit 4e763c5

Please sign in to comment.