-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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): Don't create top level variables (#2985)
swc_ecma_minifier: - Add `module` to `TerserCompressorOptions`. - Don't create top level variables while inlining if `module` is false. - Drop more unused parameters.
- Loading branch information
Showing
18 changed files
with
116 additions
and
66 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
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
...nalChaining/optionalChainingInParameterBindingPattern.2/input.ts/es5.2.minified/output.js
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,5 +1,5 @@ | ||
var ref, ref1, a = function() { | ||
}; | ||
(void 0)[null === (ref = a()) || void 0 === ref ? void 0 : ref.d], (function(param) { | ||
(void 0)[null === (ref = a()) || void 0 === ref ? void 0 : ref.d], (function() { | ||
(void 0)[null === (ref1 = a()) || void 0 === ref1 ? void 0 : ref1.d], arguments.length > 1 && void 0 !== arguments[1] && arguments[1]; | ||
})(); |
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/tests/vercel/full-compact/d3-color/1/output/index.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
crates/swc/tests/vercel/full-compact/react-autosuggest/1/output/index.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
4a7937d
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
full_es2015
178802365
ns/iter (± 23829187
)199088704
ns/iter (± 9180703
)0.90
full_es2016
130265879
ns/iter (± 5906385
)160859778
ns/iter (± 9304873
)0.81
full_es2017
134607173
ns/iter (± 6333929
)163965339
ns/iter (± 9148249
)0.82
full_es2018
133966569
ns/iter (± 18862215
)161658185
ns/iter (± 7509668
)0.83
full_es2019
144900840
ns/iter (± 15480644
)160893500
ns/iter (± 6929672
)0.90
full_es2020
132830156
ns/iter (± 5530700
)158717903
ns/iter (± 7813790
)0.84
full_es3
187275288
ns/iter (± 368016048
)224986255
ns/iter (± 18253156
)0.83
full_es5
174605896
ns/iter (± 20435477
)209176289
ns/iter (± 11881676
)0.83
parser
615596
ns/iter (± 26625
)744947
ns/iter (± 66199
)0.83
This comment was automatically generated by workflow using github-action-benchmark.