Skip to content

Make images smaller using best-in-class codecs, right in the browser.

JavaScript

Remove support for Webpack 3.x and prior from `WatchTimestampsPlugin`.

Jason Miller2ff3de518d17
diff --git a/config/watch-timestamps-plugin.js b/config/watch-timestamps-plugin.js
index ff75e2cc..ff163598 100644
--- a/config/watch-timestamps-plugin.js
+++ b/config/watch-timestamps-plugin.js
@@ -14,8 +14,8 @@ module.exports = class WatchTimestampsPlugin {
apply(compiler) {
compiler.plugin('watch-run', (watch, callback) => {
- let patterns = this.patterns;
- let timestamps = watch.fileTimestamps || watch.compiler.fileTimestamps;
+ const patterns = this.patterns;
+ const timestamps = watch.fileTimestamps;
Object.keys(timestamps).forEach(filepath => {
if (patterns.some(pat => pat instanceof RegExp ? pat.test(filepath) : filepath.indexOf(pat) === 0)) {