Skip to content

Commit ae824b2

Browse files
author
Standa Opichal
committed
Declarations update independent of compiler.watchFileSystem
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.
1 parent b0d10da commit ae824b2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,8 @@ function ensureTypeScriptInstance(loaderOptions: LoaderOptions, loader: any): {
488488

489489
// manually update changed declaration files
490490
loader._compiler.plugin("watch-run", (watching, cb) => {
491-
var mtimes = watching.compiler.watchFileSystem.watcher.mtimes;
491+
var mtimes = watching.compiler.fileTimestamps ||
492+
watching.compiler.watchFileSystem.watcher.mtimes;
492493
Object.keys(mtimes)
493494
.filter(filePath => !!filePath.match(/\.d\.ts$/))
494495
.forEach(filePath => {

0 commit comments

Comments
 (0)