10
README.md
10
README.md
@@ -1429,3 +1429,13 @@ To allow for better optimizations, the compiler makes various assumptions:
|
||||
// Actual: "undefined 42"
|
||||
```
|
||||
UglifyJS may modify the input which in turn may suppress those errors.
|
||||
- Later versions of JavaScript will throw `SyntaxError` with the following:
|
||||
```javascript
|
||||
"use strict";
|
||||
console.log(function f() {
|
||||
return f = "PASS";
|
||||
}());
|
||||
// Expected: "PASS"
|
||||
// Actual: TypeError: invalid assignment to const 'f'
|
||||
```
|
||||
UglifyJS may modify the input which in turn may suppress those errors.
|
||||
|
||||
@@ -2127,7 +2127,9 @@ function errorln(msg) {
|
||||
}
|
||||
|
||||
function try_beautify(code, toplevel, result, printfn, options) {
|
||||
var beautified = UglifyJS.minify(code, JSON.parse(beautify_options));
|
||||
var o = JSON.parse(beautify_options);
|
||||
if (async && has_await) o.module = true;
|
||||
var beautified = UglifyJS.minify(code, o);
|
||||
if (beautified.error) {
|
||||
printfn("// !!! beautify failed !!!");
|
||||
printfn(beautified.error);
|
||||
|
||||
Reference in New Issue
Block a user