Skip to content

Commit

Permalink
fix: fix webpack logger usage
Browse files Browse the repository at this point in the history
  • Loading branch information
rafalmaciejewski committed Apr 22, 2020
1 parent c398f61 commit 114f68e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/BuildTimeReporterWebpackPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,14 @@ export class BuildTimeReporterWebpackPlugin {
report.addChunks(compilation.chunks);
report.addModules(compilation.modules);
} else {
compilation.getLogger(PLUGIN_NAME).warn('trackEmit: could not find report', compilation.hash);
this.compiler.getInfrastructureLogger(PLUGIN_NAME).warn('trackEmit: could not find report', compilation.hash);
}
});
}

private sendStatsWhenDone(): void {
this.compiler.hooks.done.tapPromise(PLUGIN_NAME, async (compilation) => {
const logger = compilation.getLogger(PLUGIN_NAME);
const logger = this.compiler.getInfrastructureLogger(PLUGIN_NAME);
const report = this.reportsByHash.get(compilation.hash as string);
try {
if (report) {
Expand Down

0 comments on commit 114f68e

Please sign in to comment.