Skip to content

Commit 4e763c5

Browse files
authored
fix(esbuild): handle tsconfck cache undefined (#14650)
1 parent 3e264ef commit 4e763c5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/vite/src/node/plugins/esbuild.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ function prettifyMessage(m: Message, code: string): string {
463463
return res + `\n`
464464
}
465465

466-
let tsconfckCache: TSConfckCache<TSConfckParseResult>
466+
let tsconfckCache: TSConfckCache<TSConfckParseResult> | undefined
467467

468468
async function loadTsconfigJsonForFile(
469469
filename: string,
@@ -518,7 +518,7 @@ async function reloadOnTsconfigChange(changedFile: string) {
518518
server.moduleGraph.invalidateAll()
519519

520520
// reset tsconfck so that recompile works with up2date configs
521-
tsconfckCache.clear()
521+
tsconfckCache?.clear()
522522

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

0 commit comments

Comments
 (0)