VSCodeMinify
VSCodeMinify copied to clipboard
Nullish Colaescing Operator ?? causes an error
It seems that Minify can't manage the nullish coalescing operator. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing_operator
I'm trying to minimize this:
const a = document.nonExistent ?? "Not found";
And get:
Minify failed: Unexpected token: operator (?)
Am I missing something?
Can confirm this also happens with something?.something
syntax. The ?
causes the next token to be unexpected
Yes, It also can be confirmed that optional chaining ?.
causes an "unexpected punc(.)" error.