We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The minifier does not seem to respect the ECMAScript version when it comes to the Optional Chaining Operator.
It was introduced in ECMAScript 2020, but regardless of the version the minifier always adds to the operator if applicable.
For example, given the following input and setting the ES version to 2016:
const test = {}; const res = test === null || test === void 0 ? void 0 : test.hello;
It returns:
const test={},res=test==null?void 0:test?.hello
As you can see, it uses the chaining operator at test?.hello but it should not. I tested setting different years < 2020 to no avail.
The text was updated successfully, but these errors were encountered:
d10da8a
Merge pull request #746 from VastBlast/fix-issue-745
bc77df5
Respect ES Version, fixes #745
Successfully merging a pull request may close this issue.
The minifier does not seem to respect the ECMAScript version when it comes to the Optional Chaining Operator.
It was introduced in ECMAScript 2020, but regardless of the version the minifier always adds to the operator if applicable.
For example, given the following input and setting the ES version to 2016:
It returns:
As you can see, it uses the chaining operator at test?.hello but it should not. I tested setting different years < 2020 to no avail.
The text was updated successfully, but these errors were encountered: