improve usability of global_defs in minify() (#1987)
Use `@key` to `parse()` string value as `AST_Node`. fixes #1986
This commit is contained in:
@@ -160,3 +160,17 @@ issue_1801: {
|
||||
console.log(!0);
|
||||
}
|
||||
}
|
||||
|
||||
issue_1986: {
|
||||
options = {
|
||||
global_defs: {
|
||||
"@alert": "console.log",
|
||||
},
|
||||
}
|
||||
input: {
|
||||
alert(42);
|
||||
}
|
||||
expect: {
|
||||
console.log(42);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user