From aff605ed5b800ec5977f48c8331ac8b808adf36e Mon Sep 17 00:00:00 2001 From: Standa Opichal Date: Fri, 22 Jul 2016 18:57:28 +0200 Subject: [PATCH] Declarations update independent of compiler.watchFileSystem (#167) Uses `watching.compiler.fileTimestamps` which is set directly in the compiler. See https://github.com/webpack/webpack/blob/master/lib/Compiler.js#L105. Fixes the https://github.com/TypeStrong/ts-loader/issues/155 when using the webpack.OldNodeWatchFileSystem. --- index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.ts b/index.ts index 04b6881d4..1dd616f11 100644 --- a/index.ts +++ b/index.ts @@ -508,7 +508,8 @@ function ensureTypeScriptInstance(loaderOptions: LoaderOptions, loader: any): { // manually update changed files loader._compiler.plugin("watch-run", (watching, cb) => { - var mtimes = watching.compiler.watchFileSystem.watcher.mtimes; + var mtimes = watching.compiler.fileTimestamps || + watching.compiler.watchFileSystem.watcher.mtimes; Object.keys(mtimes) .filter(filePath => !!filePath.match(/\.tsx?$|\.jsx?$/)) .forEach(filePath => {