From d0f137560ff84bc4b899d91cecde744a8c46ecbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luka=20Zakraj=C5=A1ek?= Date: Wed, 22 Feb 2017 18:51:19 +0100 Subject: [PATCH] Fix watchpack breaking API (#482) --- src/interfaces.ts | 2 +- src/watch-run.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/interfaces.ts b/src/interfaces.ts index 2c4ed880b..8f2b183ef 100644 --- a/src/interfaces.ts +++ b/src/interfaces.ts @@ -139,7 +139,7 @@ export interface WebpackModule { } export interface Watcher { - mtimes: number; // a guess + getTimes(): { [filePath: string]: number }; } export interface WebpackNodeWatchFileSystem { diff --git a/src/watch-run.ts b/src/watch-run.ts index ad9169ad6..b5ef698e8 100644 --- a/src/watch-run.ts +++ b/src/watch-run.ts @@ -16,7 +16,7 @@ function makeWatchRun( instance.modifiedFiles = {}; } - Object.keys(watcher.mtimes) + Object.keys(watcher.getTimes()) .filter(filePath => !!filePath.match(constants.tsTsxJsJsxRegex)) .forEach(filePath => { filePath = path.normalize(filePath);