From 5ba497b08831f83f512d61e573d3ad11739bb9be Mon Sep 17 00:00:00 2001 From: ahnpnl Date: Wed, 7 Aug 2024 13:28:21 +0200 Subject: [PATCH] fix(compiler): fallback to `NodeJS` module resolution for ts 4.8 Fixes #4499 --- src/legacy/compiler/ts-compiler.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/legacy/compiler/ts-compiler.ts b/src/legacy/compiler/ts-compiler.ts index 9e8bcbd759..418e2623bb 100644 --- a/src/legacy/compiler/ts-compiler.ts +++ b/src/legacy/compiler/ts-compiler.ts @@ -147,7 +147,7 @@ export class TsCompiler implements TsCompilerInstance { } private fixupCompilerOptionsForModuleKind(compilerOptions: CompilerOptions, isEsm: boolean): CompilerOptions { - const moduleResolution = this._ts.ModuleResolutionKind.Node10 + const moduleResolution = this._ts.ModuleResolutionKind.Node10 ?? this._ts.ModuleResolutionKind.NodeJs if (!isEsm) { return { ...compilerOptions,