From cf5326d9b5f1b804ff8d817f88fb127bc45ad9d1 Mon Sep 17 00:00:00 2001 From: Alexander Akait <4567934+alexander-akait@users.noreply.github.com> Date: Tue, 23 May 2023 18:02:14 +0300 Subject: [PATCH] fix: add config file as build dependency (#1611) * fix: add config file as build dependency * chore: update meta --- CHANGELOG.md | 3 +++ package.json | 2 +- src/instances.ts | 5 +++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c6459029..f6d7a7388 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## 9.4.3 +* [Bug fix: add config file as build dependency](https://github.com/TypeStrong/ts-loader/pull/1611) - thanks @alexander-akait + ## 9.4.2 * [Bug fix: Use custom transformer when building solution references](https://github.com/TypeStrong/ts-loader/pull/1550) [#1025] - thanks @feosuna1 diff --git a/package.json b/package.json index 143a8ca69..72375d98a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ts-loader", - "version": "9.4.2", + "version": "9.4.3", "description": "TypeScript loader for webpack", "main": "index.js", "types": "dist", diff --git a/src/instances.ts b/src/instances.ts index f5de00de4..26985e631 100644 --- a/src/instances.ts +++ b/src/instances.ts @@ -147,6 +147,11 @@ function successfulTypeScriptInstance( } const { configFilePath, configFile } = configFileAndPath; + + if (configFilePath) { + loader.addBuildDependency(configFilePath); + } + const filePathKeyMapper = createFilePathKeyMapper(compiler, loaderOptions); if (configFilePath && loaderOptions.projectReferences) { const configFileKey = filePathKeyMapper(configFilePath);