From d13d9c3d38d1f68d76d1773937e96df527c11c2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20Flatval?= <70905152+haakonflatval-cognite@users.noreply.github.com> Date: Wed, 28 Jun 2023 11:34:21 +0200 Subject: [PATCH] Make skipLibCheck overridable (#1617) * Make skipLibCheck overridable * Bump to version 9.4.4 * Add changelog entry --- CHANGELOG.md | 3 +++ package.json | 2 +- src/compilerSetup.ts | 13 +++++++++---- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f6d7a7388..a66a0840b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## 9.4.4 +* [Bug fix: let users override skipLibCheck](https://github.com/TypeStrong/ts-loader/pull/1617) - thanks @haakonflatval-cognite + ## 9.4.3 * [Bug fix: add config file as build dependency](https://github.com/TypeStrong/ts-loader/pull/1611) - thanks @alexander-akait diff --git a/package.json b/package.json index 026f027f4..9445113be 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ts-loader", - "version": "9.4.3", + "version": "9.4.4", "description": "TypeScript loader for webpack", "main": "index.js", "types": "dist", diff --git a/src/compilerSetup.ts b/src/compilerSetup.ts index 68bb3a970..a986d7e5e 100644 --- a/src/compilerSetup.ts +++ b/src/compilerSetup.ts @@ -55,10 +55,15 @@ export function getCompilerOptions( configParseResult: typescript.ParsedCommandLine, compiler: typeof typescript ) { - const compilerOptions = Object.assign({}, configParseResult.options, { - skipLibCheck: true, - suppressOutputPathCheck: true, // This is why: https://github.com/Microsoft/TypeScript/issues/7363 - } as typescript.CompilerOptions); + const defaultOptions = { skipLibCheck: true }; + + const compilerOptions = Object.assign( + defaultOptions, + configParseResult.options, + { + suppressOutputPathCheck: true, // This is why: https://github.com/Microsoft/TypeScript/issues/7363 + } as typescript.CompilerOptions + ); // if `module` is not specified and not using ES6+ target, default to CJS module output if (