Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(es/minifier): Change the default of
mangle.toplevel
to false (#…
- Loading branch information
Showing
7 changed files
with
21 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
crates/swc_ecma_minifier/tests/fixture/issues/6344/1/mangle.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
{} | ||
{ | ||
"toplevel": true | ||
} |
4 changes: 3 additions & 1 deletion
4
crates/swc_ecma_minifier/tests/fixture/issues/6344/2/mangle.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
{} | ||
{ | ||
"toplevel": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
crates/swc_html_minifier/tests/fixture/element/script-options-1/output.min.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<!doctype html><html lang=en><title>Document</title><body><script type=module>const t="bar";function foo(){return"bartest"}</script> | ||
<!doctype html><html lang=en><title>Document</title><body><script type=module>const my="bar";function foo(){return"bartest"}</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
99934b0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Benchmark
es/full/bugs-1
353937
ns/iter (± 15478
)343131
ns/iter (± 18927
)1.03
es/full/minify/libraries/antd
1868891374
ns/iter (± 34639916
)1879029520
ns/iter (± 86154105
)0.99
es/full/minify/libraries/d3
421790779
ns/iter (± 8879696
)414102995
ns/iter (± 17005550
)1.02
es/full/minify/libraries/echarts
1607486654
ns/iter (± 22612941
)1577618030
ns/iter (± 58450498
)1.02
es/full/minify/libraries/jquery
112252600
ns/iter (± 5703459
)102708379
ns/iter (± 4908626
)1.09
es/full/minify/libraries/lodash
121615034
ns/iter (± 3380778
)125489448
ns/iter (± 6342439
)0.97
es/full/minify/libraries/moment
61102830
ns/iter (± 2091024
)59496706
ns/iter (± 2012974
)1.03
es/full/minify/libraries/react
20960742
ns/iter (± 607548
)19967860
ns/iter (± 1038082
)1.05
es/full/minify/libraries/terser
323519854
ns/iter (± 42117752
)337947003
ns/iter (± 54535627
)0.96
es/full/minify/libraries/three
569456979
ns/iter (± 42207651
)573368575
ns/iter (± 33838779
)0.99
es/full/minify/libraries/typescript
3461879651
ns/iter (± 132493402
)3503261209
ns/iter (± 124237777
)0.99
es/full/minify/libraries/victory
885543151
ns/iter (± 20195024
)864893126
ns/iter (± 39416137
)1.02
es/full/minify/libraries/vue
188916760
ns/iter (± 9096546
)171950018
ns/iter (± 10840345
)1.10
es/full/codegen/es3
34554
ns/iter (± 1230
)35524
ns/iter (± 2234
)0.97
es/full/codegen/es5
34282
ns/iter (± 1448
)35047
ns/iter (± 3099
)0.98
es/full/codegen/es2015
34593
ns/iter (± 1267
)34463
ns/iter (± 1634
)1.00
es/full/codegen/es2016
34499
ns/iter (± 1368
)34603
ns/iter (± 1133
)1.00
es/full/codegen/es2017
34845
ns/iter (± 1992
)34599
ns/iter (± 1274
)1.01
es/full/codegen/es2018
34526
ns/iter (± 2356
)34350
ns/iter (± 1591
)1.01
es/full/codegen/es2019
34348
ns/iter (± 1842
)34720
ns/iter (± 2050
)0.99
es/full/codegen/es2020
34195
ns/iter (± 1428
)34496
ns/iter (± 1178
)0.99
es/full/all/es3
229084131
ns/iter (± 14912080
)200853664
ns/iter (± 13412938
)1.14
es/full/all/es5
180403040
ns/iter (± 11310020
)234003167
ns/iter (± 30838241
)0.77
es/full/all/es2015
148853027
ns/iter (± 7310353
)181154661
ns/iter (± 21853824
)0.82
es/full/all/es2016
149398134
ns/iter (± 16523408
)161489277
ns/iter (± 26404058
)0.93
es/full/all/es2017
163861520
ns/iter (± 14451991
)161681927
ns/iter (± 8902858
)1.01
es/full/all/es2018
156390161
ns/iter (± 15223961
)158742089
ns/iter (± 9826764
)0.99
es/full/all/es2019
149809909
ns/iter (± 12657867
)174600328
ns/iter (± 11801874
)0.86
es/full/all/es2020
139469119
ns/iter (± 10011078
)155677061
ns/iter (± 9995349
)0.90
es/full/parser
728932
ns/iter (± 28397
)756093
ns/iter (± 52006
)0.96
es/full/base/fixer
26728
ns/iter (± 1184
)28013
ns/iter (± 2796
)0.95
es/full/base/resolver_and_hygiene
92334
ns/iter (± 4845
)97198
ns/iter (± 4485
)0.95
serialization of ast node
226
ns/iter (± 9
)220
ns/iter (± 7
)1.03
serialization of serde
233
ns/iter (± 4
)224
ns/iter (± 5
)1.04
This comment was automatically generated by workflow using github-action-benchmark.