feat: 编译使用 terser 压缩 (#1748)

This commit is contained in:
吴多益 2021-04-06 10:50:17 +08:00 committed by GitHub
parent 242b51b9a8
commit f673602ef1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -420,11 +420,11 @@ if (fis.project.currentMedia() === 'publish') {
env.match('/examples/mod.js', {
isMod: false,
optimizer: fis.plugin('uglify-js')
optimizer: fis.plugin('terser')
});
env.match('*.{js,jsx,ts,tsx}', {
optimizer: fis.plugin('uglify-js'),
optimizer: fis.plugin('terser'),
moduleId: function (m, path) {
return fis.util.md5('amis-sdk' + path);
}
@ -812,7 +812,7 @@ if (fis.project.currentMedia() === 'publish') {
});
ghPages.match('*.{js,ts,tsx,jsx}', {
optimizer: fis.plugin('uglify-js'),
optimizer: fis.plugin('terser'),
useHash: true
});

View File

@ -121,6 +121,7 @@
"core-js": "^3.7.0",
"css": "2.2.1",
"faker": "^4.1.0",
"fis-optimizer-terser": "^1.0.1",
"fis-parser-sass": "^1.0.1",
"fis-parser-svgr": "^1.0.0",
"fis3": "^3.4.41",