Skip to content

Commit

Permalink
fix: use uglify3 (#1004)
Browse files Browse the repository at this point in the history
Co-authored-by: peize.rpz <peize.rpz@alibaba-inc.com>
  • Loading branch information
PeterRao and peize.rpz committed Oct 26, 2021
1 parent bec8845 commit 36a9ef3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 84 deletions.
5 changes: 4 additions & 1 deletion browser-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,14 @@ function build(options, callback) {
if (options.minify) {
var uglify = require('uglify-js');
var minified = uglify.minify(code, {
fromString: true,
output: {
'ascii_only': true
}
});
if (minified.error) {
console.error(minified.error);
process.exit(1)
}
code = minified.code;
}
code = license + code;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
"stream-equal": "^1.1.0",
"timemachine": "^0.3.0",
"typescript": "^3.9.5",
"uglify-js": "^2.8.29",
"uglify-js": "^3.14.2",
"watchify": "^3.11.1"
},
"dependencies": {
Expand Down
Loading

0 comments on commit 36a9ef3

Please sign in to comment.