improve usability of --mangle-props (#5669)

This commit is contained in:
Alex Lam S.L
2022-09-18 02:37:06 +01:00
committed by GitHub
parent eb22f0101e
commit 5ac6ec5496
8 changed files with 93 additions and 9 deletions

View File

@@ -126,6 +126,8 @@ function reserve_quoted_keys(ast, reserved) {
ast.walk(new TreeWalker(function(node) {
if (node instanceof AST_ClassProperty) {
if (node.start && node.start.quote) add(node.key);
} else if (node instanceof AST_Dot) {
if (node.quoted) add(node.property);
} else if (node instanceof AST_ObjectProperty) {
if (node.start && node.start.quote) add(node.key);
} else if (node instanceof AST_Sub) {