From 6a5806387c1c0ba625df59810d40ebfc035cf716 Mon Sep 17 00:00:00 2001 From: Simon Garner Date: Thu, 17 Dec 2020 07:16:03 +1300 Subject: [PATCH] When stats fail to upload, continue webpack build --- packages/webpack-plugin/src/index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/webpack-plugin/src/index.js b/packages/webpack-plugin/src/index.js index 199f824..4c40978 100644 --- a/packages/webpack-plugin/src/index.js +++ b/packages/webpack-plugin/src/index.js @@ -29,7 +29,12 @@ class BundleAnalyzer { }) .then(() => callback()) .catch(error => { - callback(new Error(`Bundle Analyzer - ${error.message}`)) + // eslint-disable-next-line no-console + console.error(`Bundle Analyzer - ${error.message}`) + // eslint-disable-next-line no-console + console.info(`Bundle Analyzer - Stats failed to upload. Continuing build...`) + + callback() }) }, )