Skip to content
This repository was archived by the owner on Oct 23, 2024. It is now read-only.

Commit d91e39d

Browse files
authored
Merge pull request #825 from qwu16/encrypt
Fix encrypt packing error issue 776
2 parents a71786f + e3189d0 commit d91e39d

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

scripts/pack.js

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,7 @@ if (options.archive) {
6767

6868
if (options.encrypt) {
6969
const encryptDeps = [
70-
'uglify-js',
71-
'babel-cli',
72-
'babel-preset-es2015',
73-
'babel-preset-stage-0',
70+
'uglify-es',
7471
];
7572

7673
// Check encrypt deps
@@ -528,13 +525,7 @@ function encrypt(target) {
528525
return Promise.resolve();
529526
}
530527
var jsJobs = stdout.trim().split('\n').map((line) => {
531-
return exec(`babel --presets es2015,stage-0 ${line} -o "${line}.es5"`, { env })
532-
.then(() => {
533-
return exec(`uglifyjs ${line}.es5 -o ${line} -c -m`, { env });
534-
})
535-
.then(() => {
536-
return exec(`rm "${line}.es5"`);
537-
});
528+
return exec(`uglifyjs ${line} -o ${line} -c -m`, { env });
538529
});
539530
return Promise.all(jsJobs);
540531
})

0 commit comments

Comments
 (0)