terser 5.3.4 → 5.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/dist/bundle.min.js +7 -1
- package/dist/bundle.min.js.map +1 -1
- package/lib/compress/index.js +3 -1
- package/lib/transform.js +5 -0
- package/package.json +1 -1
package/lib/compress/index.js
CHANGED
@@ -6367,7 +6367,9 @@ def_optimize(AST_SymbolRef, function(self, compressor) {
|
|
6367
6367
|
&& !(parent instanceof AST_Call
|
6368
6368
|
&& (parent.is_expr_pure(compressor))
|
6369
6369
|
|| has_annotation(parent, _NOINLINE))
|
6370
|
-
&& !(
|
6370
|
+
&& !(parent instanceof AST_Export
|
6371
|
+
&& fixed instanceof AST_Lambda
|
6372
|
+
&& fixed.name);
|
6371
6373
|
|
6372
6374
|
if (single_use && (fixed instanceof AST_Lambda || fixed instanceof AST_Class)) {
|
6373
6375
|
if (retain_top_func(fixed, compressor)) {
|
package/lib/transform.js
CHANGED
@@ -51,6 +51,7 @@ import {
|
|
51
51
|
AST_Call,
|
52
52
|
AST_Case,
|
53
53
|
AST_Catch,
|
54
|
+
AST_Chain,
|
54
55
|
AST_Class,
|
55
56
|
AST_Conditional,
|
56
57
|
AST_Definitions,
|
@@ -236,6 +237,10 @@ def_transform(AST_Sub, function(self, tw) {
|
|
236
237
|
self.property = self.property.transform(tw);
|
237
238
|
});
|
238
239
|
|
240
|
+
def_transform(AST_Chain, function(self, tw) {
|
241
|
+
self.expression = self.expression.transform(tw);
|
242
|
+
});
|
243
|
+
|
239
244
|
def_transform(AST_Yield, function(self, tw) {
|
240
245
|
if (self.expression) self.expression = self.expression.transform(tw);
|
241
246
|
});
|