webpack, , . , , , . , :
watching.compiler.watchFileSystem.watcher.mtimes
, , , , . , , , .
, ( ):
this.plugin("watch-run", (watching, done) => {
const changedTimes = watching.compiler.watchFileSystem.watcher.mtimes;
const changedFiles = Object.keys(changedTimes)
.map(file => `\n ${file}`)
.join("");
if (changedFiles.length) {
console.log("New build triggered, files changed:", changedFiles);
}
done();
});
:
New build triggered, files changed:
/path/to/app/src/components/item/Item.js
/path/to/app/src/App.js
. , .