From 69082d386ea5a3f0eb8a05d13a3f6c7cb89051b6 Mon Sep 17 00:00:00 2001 From: Arunoda Susiripala Date: Tue, 8 Nov 2016 03:17:03 +0530 Subject: [PATCH 1/2] Set errorDetails: false when getting webpack stats This will fix the issue of print duplicate errors on the client. --- middleware.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/middleware.js b/middleware.js index 6386300..ddf8442 100644 --- a/middleware.js +++ b/middleware.js @@ -74,7 +74,7 @@ function createEventStream(heartbeat) { function publishStats(action, statsResult, eventStream, log) { // For multi-compiler, stats will be an object with a 'children' array of stats - var bundles = extractBundles(statsResult.toJson()); + var bundles = extractBundles(statsResult.toJson({ errorDetails: false })); bundles.forEach(function(stats) { if (log) { log("webpack built " + (stats.name ? stats.name + " " : "") + From 14d1ffcaf6e6a657768bf41e9f3e94a12c422c01 Mon Sep 17 00:00:00 2001 From: Arunoda Susiripala Date: Tue, 8 Nov 2016 03:22:34 +0530 Subject: [PATCH 2/2] Fix styling --- middleware.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/middleware.js b/middleware.js index ddf8442..4ea2306 100644 --- a/middleware.js +++ b/middleware.js @@ -74,7 +74,7 @@ function createEventStream(heartbeat) { function publishStats(action, statsResult, eventStream, log) { // For multi-compiler, stats will be an object with a 'children' array of stats - var bundles = extractBundles(statsResult.toJson({ errorDetails: false })); + var bundles = extractBundles(statsResult.toJson({ errorDetails: false })); bundles.forEach(function(stats) { if (log) { log("webpack built " + (stats.name ? stats.name + " " : "") +