Minifying this:
function foo(arr)
{
let [a, b] = arr;
};
Crashes with "SyntaxError: unknown: NodePath has been removed so is read-only. (This is an error on an internal node. Probably an internal error)"
A likely related case is this:
function foo()
{
return getPromise()
.then(arr =>
{
let [a, b] = arr;
console.log(a);
});
};
Minifying this succeeds, but the destructured let is completely removed, leaving references to nonexistent variables:
function foo() {
return getPromise().then((b) => {
console.log(a); // oops: 'a' declaration removed
});
}
Minifying this:
Crashes with "SyntaxError: unknown: NodePath has been removed so is read-only. (This is an error on an internal node. Probably an internal error)"
A likely related case is this:
Minifying this succeeds, but the destructured let is completely removed, leaving references to nonexistent variables: