You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Version (complete output of terser -V or specific git commit)
The version of https://try.terser.org/ (I am assuming latest, but the website doesn't show me what version it is running)
Expected result
Terser should error on this, as you can't use private fields in an object. However, terser rewrites it to a regular object field which is legal syntax. So even though the input is illegal JavaScript, if users don't catch this issue, terser rewrites it to legal syntax and leading to incorrect code. Therefore, if users don't check their code in any other way, running the terser output will result in runtime errors.
The text was updated successfully, but these errors were encountered:
Bug report or Feature request?
Bug
Version (complete output of
terser -V
or specific git commit)The version of https://try.terser.org/ (I am assuming latest, but the website doesn't show me what version it is running)
Complete CLI command or
minify()
options usedterser
inputterser
output or errorExpected result
Terser should error on this, as you can't use private fields in an object. However,
terser
rewrites it to a regular object field which is legal syntax. So even though the input is illegal JavaScript, if users don't catch this issue,terser
rewrites it to legal syntax and leading to incorrect code. Therefore, if users don't check their code in any other way, running theterser
output will result in runtime errors.The text was updated successfully, but these errors were encountered: