From 7fca9ac85f8dfa744835156f920edb78a3f45a42 Mon Sep 17 00:00:00 2001 From: Jason Miller Date: Tue, 27 Mar 2018 20:43:12 -0400 Subject: [PATCH] Add explanation and credit to `WatchTimestampsPlugin`. --- config/watch-timestamps-plugin.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/config/watch-timestamps-plugin.js b/config/watch-timestamps-plugin.js index d0a8eadf..ff75e2cc 100644 --- a/config/watch-timestamps-plugin.js +++ b/config/watch-timestamps-plugin.js @@ -1,5 +1,12 @@ const fs = require('fs'); +/** A Webpack plugin to refresh file mtime values from disk before compiling. + * This is used in order to account for SCSS-generated .d.ts files written + * as part of compilation so they trigger only a single recompile per write. + * + * All credit for the technique and implementation goes to @reiv. See: + * https://github.com/Jimdo/typings-for-css-modules-loader/issues/48#issuecomment-347036461 + */ module.exports = class WatchTimestampsPlugin { constructor(patterns) { this.patterns = patterns;