mirror of
https://github.com/openharmony/third_party_jsframework.git
synced 2026-07-18 04:20:52 -04:00
69d7620bb0
Signed-off-by: lixingchi1 <lixingchi1@huawei.com>
18 lines
315 B
JavaScript
18 lines
315 B
JavaScript
const uglifyJS = require('uglify-js');
|
|
|
|
module.exports = function uglifyJs() {
|
|
return {
|
|
name: 'uglifyjs',
|
|
renderChunk(code) {
|
|
const res = uglifyJS.minify(code);
|
|
if (res.error) {
|
|
return;
|
|
}
|
|
return {
|
|
code: res.code,
|
|
map: { mappings: '' }
|
|
};
|
|
}
|
|
};
|
|
}
|