Skip to content

Commit

Permalink
refactor: clearer export
Browse files Browse the repository at this point in the history
  • Loading branch information
mxdvl committed Jun 24, 2024
1 parent 9fcedb5 commit 0b1f801
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tools/webpack-progress-reporter.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
const ProgressPlugin = require('webpack/lib/ProgressPlugin');

module.exports = (observer) =>
const reporter = (observer) =>
new ProgressPlugin((progress, msg, ...details) => {
const [a, b] = details;
const state = a && b ? `[${a}, ${b}]` : '';
return observer.next(`${Math.round(progress * 100)}% ${msg} ${state}`);
});

module.exports = reporter;

0 comments on commit 0b1f801

Please sign in to comment.