enhance global_defs

- support arrays, objects & AST_Node
- support `"a.b":1` on both cli & API
- emit warning if variable is modified
- override top-level variables

fixes #1416
closes #1198
closes #1469
This commit is contained in:
alexlamsl
2017-02-18 19:27:31 +08:00
parent 974247c8c0
commit e275148998
8 changed files with 324 additions and 34 deletions

View File

@@ -454,6 +454,8 @@ if (DEBUG) {
}
```
You can specify nested constants in the form of `--define env.DEBUG=false`.
UglifyJS will warn about the condition being always false and about dropping
unreachable code; for now there is no option to turn off only this specific
warning, you can pass `warnings=false` to turn off *all* warnings.