Add syntax error overlay in development (#744)

* Add syntax error overlay in development

* Support HMR being disabled

* Tweak CSS
This commit is contained in:
Dan Abramov
2016-09-25 11:31:10 +01:00
committed by GitHub
parent d75a771515
commit 9cce0fb59f
6 changed files with 371 additions and 53 deletions

View File

@@ -76,7 +76,7 @@ function setupCompiler(host, port, protocol) {
// We have switched off the default Webpack output in WebpackDevServer
// options so we are going to "massage" the warnings and errors and present
// them in a readable focused way.
var messages = formatWebpackMessages(stats);
var messages = formatWebpackMessages(stats.toJson({}, true));
if (!messages.errors.length && !messages.warnings.length) {
console.log(chalk.green('Compiled successfully!'));
console.log();