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); }