From e2779f42031569f9b4b47bb8a302f48ef852405b Mon Sep 17 00:00:00 2001 From: Martin Costello Date: Wed, 6 Sep 2023 17:12:44 +0100 Subject: [PATCH] feat: Log minification error when `--debug` (#1102) If the `--debug` flag is specified, log any error during minification to the console. --- src/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/index.js b/src/index.js index 03b3f8f6..6d6774ce 100644 --- a/src/index.js +++ b/src/index.js @@ -522,6 +522,9 @@ function ncc ( } catch (e) { console.log('An error occurred while minifying. The result will not be minified.'); + if (debugLog) { + console.log(e); + } } }