Skip to content

Commit ccb1d65

Browse files
author
Pooya Parsa
committed
fix: fix cannot read property 'write' of undefined
1 parent bf3aa91 commit ccb1d65

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -85,20 +85,20 @@ export default class WebpackBarPlugin extends webpack.ProgressPlugin {
8585
// Started
8686
this.state.start = process.hrtime();
8787
if (this.options.minimal) {
88-
this.stream.write(`Compiling ${this.options.name}\n`);
88+
this.options.stream.write(`Compiling ${this.options.name}\n`);
8989
}
9090
delete this.state.time;
9191
} else if (wasRunning && !isRunning) {
9292
// Finished
9393
const time = process.hrtime(this.state.start);
9494
if (this.options.minimal) {
95-
this.stream.write(
95+
this.options.stream.write(
9696
`Compiled ${this.options.name} in ${prettyTime(this.state.time)}\n`
9797
);
9898
} else {
9999
this.logUpdate.clear();
100100
if (this.options.compiledIn) {
101-
process.stdout.write(
101+
this.options.stream.write(
102102
`${[
103103
TICK,
104104
this.options.name,

0 commit comments

Comments
 (0)