fix name for log hook

This commit is contained in:
Tobias Koppers 2019-07-31 16:57:01 +02:00
parent 8f0a443e6c
commit 0c8d75c151
1 changed files with 4 additions and 2 deletions

View File

@ -86,7 +86,7 @@ class Compiler extends Tapable {
watchClose: new SyncHook([]),
/** @type {SyncBailHook<string, string, any[]>} */
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<string, Entry>} */
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);
}