From 0022702822edd023fcb882878522f22a56c2eaa6 Mon Sep 17 00:00:00 2001 From: weyusi Date: Thu, 27 Sep 2018 17:40:38 +0930 Subject: [PATCH] Don't parse irrelevent options to uglifyjs --- lib/filter.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/filter.js b/lib/filter.js index 0b86abc..901e8c3 100644 --- a/lib/filter.js +++ b/lib/filter.js @@ -78,10 +78,11 @@ function logic_js(str, data) { } } - //uglifyjs doesn't like 'enable' option + //uglifyjs doesn't like irrelevant options delete options.enable + delete options.logger + delete options.exclude var result = UglifyJS.minify(str, options); - console.log(result.error); var saved = ((str.length - result.code.length) / str.length * 100).toFixed(2); if (options.logger) { var log = hexo.log || console.log;