mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-29 18:39:05 +08:00
feat: 编译使用 terser 压缩 (#1748)
This commit is contained in:
parent
242b51b9a8
commit
f673602ef1
@ -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
|
||||
});
|
||||
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user