mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-04-24 05:05:53 +08:00
Prettify errors and warnings for Webpack 2 (#2113)
* Prettify errors and warnings for Webpack 2 * Update formatWebpackMessages.js
This commit is contained in:
@@ -182,8 +182,13 @@ function handleWarnings(warnings) {
|
||||
|
||||
function printWarnings() {
|
||||
// Print warnings to the console.
|
||||
for (var i = 0; i < warnings.length; i++) {
|
||||
console.warn(stripAnsi(warnings[i]));
|
||||
var formatted = formatWebpackMessages({
|
||||
warnings: warnings,
|
||||
errors: [],
|
||||
});
|
||||
|
||||
for (var i = 0; i < formatted.warnings.length; i++) {
|
||||
console.warn(stripAnsi(formatted.warnings[i]));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user