From cbc0b74753d9b71790a51a22c813723102db21df Mon Sep 17 00:00:00 2001 From: lihong Date: Thu, 23 Sep 2021 19:56:48 +0800 Subject: [PATCH] lihong67@huawei.com fix release hap build error. Signed-off-by: lihong Change-Id: Iff41c80b1dd9eaa935387bb72a55bab12b54d318 --- compiler/webpack.config.js | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/compiler/webpack.config.js b/compiler/webpack.config.js index e4c649afa..8e0ab7b80 100644 --- a/compiler/webpack.config.js +++ b/compiler/webpack.config.js @@ -130,24 +130,7 @@ function setReleaseConfig(config) { emitOnErrors: true, usedExports: false, minimize: true, - minimizer: [ - new TerserPlugin({ - minify: (file, sourceMap) => { - const uglifyEsOptions = { - compress: { - unused: true - }, - sourceMap: { - content: sourceMap - } - }; - if (/\/workers\//.test(Object.keys(file)[0])) { - uglifyEsOptions.compress.unused = false; - } - return require('uglify-es').minify(file, uglifyEsOptions); - }, - }), - ] + minimizer: [ new TerserPlugin() ] }; config.output.sourceMapFilename = '_releaseMap/[name].js.map'; } -- Gitee