Skip to content

Commit

Permalink
fix name for log hook
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra committed Aug 1, 2019
1 parent 8f0a443 commit 0c8d75c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/Compiler.js
Expand Up @@ -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
Expand All @@ -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) {
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 0c8d75c

Please sign in to comment.