From 217bc5aa2bb007587d215855a18c02e8415176fb Mon Sep 17 00:00:00 2001 From: martincostello Date: Tue, 8 Aug 2023 08:34:42 +0100 Subject: [PATCH] feat: Log minification error when --debug 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); + } } }