From 0c8d75c151d19a78fada2ea8b17a2fd3ebfbc6f1 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Wed, 31 Jul 2019 16:57:01 +0200 Subject: [PATCH] fix name for log hook --- lib/Compiler.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/Compiler.js b/lib/Compiler.js index 97ae85c3437..e07453398e9 100644 --- a/lib/Compiler.js +++ b/lib/Compiler.js @@ -86,7 +86,7 @@ class Compiler extends Tapable { watchClose: new SyncHook([]), /** @type {SyncBailHook} */ - infrastructurelog: new SyncBailHook(["origin", "type", "args"]), + infrastructureLog: new SyncBailHook(["origin", "type", "args"]), // TODO the following hooks are weirdly located here // TODO move them for webpack 5 @@ -101,6 +101,8 @@ class Compiler extends Tapable { /** @type {SyncBailHook} */ entryOption: new SyncBailHook(["context", "entry"]) }; + // TODO webpack 5 remove this + this.hooks.infrastructurelog = this.hooks.infrastructureLog; this._pluginCompat.tap("Compiler", options => { switch (options.name) { @@ -221,7 +223,7 @@ class Compiler extends Tapable { ); } } - if (this.hooks.infrastructurelog.call(name, type, args) === undefined) { + if (this.hooks.infrastructureLog.call(name, type, args) === undefined) { if (this.infrastructureLogger !== undefined) { this.infrastructureLogger(name, type, args); }