Skip to content

Commit

Permalink
Declarations update independent of compiler.watchFileSystem
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
Standa Opichal committed Mar 3, 2016
1 parent b0d10da commit ae824b2
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 @@ -488,7 +488,8 @@ function ensureTypeScriptInstance(loaderOptions: LoaderOptions, loader: any): {

// manually update changed declaration 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(/\.d\.ts$/))
.forEach(filePath => {
Expand Down

0 comments on commit ae824b2

Please sign in to comment.