Skip to content

Commit 9d8381d

Browse files
committedJan 12, 2023
minor tweaks of minification settings for core-js-bundle
1 parent 4eeb86b commit 9d8381d

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed
 

‎CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
- Added Samsung Internet 20 compat data mapping
77
- Added Quest Browser 25 compat data mapping
88
- Added Electron 23 and 24 compat data mapping
9+
- Minor tweaks of minification settings for `core-js-bundle`
910
- Refactoring, some minor fixes, improvements, optimizations
1011

1112
##### [3.27.1 - 2022.12.30](https://github.com/zloirock/core-js/releases/tag/v3.27.1)

‎scripts/bundle-package/bundle-package.mjs

+9-4
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,26 @@ async function bundle({ bundled, minified, options = {} }) {
2020
if (!minified) return;
2121

2222
const { code, map } = await minify(source, {
23-
ecma: 5,
23+
ecma: 3,
2424
ie8: true,
25+
safari10: true,
2526
keep_fnames: true,
2627
compress: {
27-
hoist_funs: false,
28+
hoist_funs: true,
2829
hoist_vars: true,
30+
passes: 2,
2931
pure_getters: true,
30-
passes: 3,
32+
// document.all detection case
33+
typeofs: false,
3134
unsafe_proto: true,
3235
unsafe_undefined: true,
3336
},
3437
format: {
3538
max_line_len: 32000,
3639
preamble: config.banner,
37-
webkit: false,
40+
webkit: true,
41+
// https://v8.dev/blog/preparser#pife
42+
wrap_func_args: false,
3843
},
3944
sourceMap: {
4045
url: `${ minified }.js.map`,

0 commit comments

Comments
 (0)
Please sign in to comment.