Skip to content

Commit

Permalink
Declarations update independent of compiler.watchFileSystem (#167)
Browse files Browse the repository at this point in the history
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 #155
when using the webpack.OldNodeWatchFileSystem.
  • Loading branch information
opichals authored and blakeembrey committed Jul 22, 2016
1 parent 26481d5 commit aff605e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down

0 comments on commit aff605e

Please sign in to comment.