Skip to content

Commit a8d29c8

Browse files
authored
Fix usage example to match [email protected] API
1 parent 90e3cc1 commit a8d29c8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/react-dev-utils/README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ clearConsole();
110110
console.log('Just cleared the screen!');
111111
```
112112

113-
#### `formatWebpackMessages(stats: WebpackStats): {errors: Array<string>, warnings: Array<string>}`
113+
#### `formatWebpackMessages({errors: Array<string>, warnings: Array<string>}): {errors: Array<string>, warnings: Array<string>}`
114114

115115
Extracts and prettifies warning and error messages from webpack [stats](https://github.com/webpack/docs/wiki/node.js-api#stats) object.
116116

@@ -125,7 +125,8 @@ compiler.plugin('invalid', function() {
125125
});
126126

127127
compiler.plugin('done', function(stats) {
128-
var messages = formatWebpackMessages(stats);
128+
var rawMessages = stats.toJson({}, true);
129+
var messages = formatWebpackMessages(rawMessages);
129130
if (!messages.errors.length && !messages.warnings.length) {
130131
console.log('Compiled successfully!');
131132
}

0 commit comments

Comments
 (0)