fix(build): use consistent minify options from previous terser config

This commit is contained in:
Evan You 2024-07-15 16:25:58 +08:00
parent f1aae57dfe
commit 789675f65d
No known key found for this signature in database
GPG Key ID: 00E9AB7A6704CE0A
1 changed files with 5 additions and 1 deletions

View File

@ -374,7 +374,11 @@ function createMinifiedConfig(/** @type {PackageFormat} */ format) {
) {
const { code, map } = await minifySwc(contents, {
module: format === 'es',
compress: true,
compress: {
ecma: 2016,
pure_getters: true,
},
safari10: true,
mangle: true,
sourceMap: !!sourcemap,
inlineSourcesContent: !sourcemapExcludeSources,