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
Bug report or Feature request? Bug
Version (complete output of terser -V or specific git commit) 5.7.1, and 5.7.1 with PR #1036
terser -V
Complete CLI command or minify() options used
minify()
npx terser -f beautify -c passes=2 a.js
terser input
terser
// a.js const endsWith = (s, t) => s.endsWith(t) export const test = (a) => { return /*#__INLINE__*/ endsWith(a, "foo") ? a.replace("foo", "foo") : /*#__INLINE__*/ endsWith(a, "bar") ? a.replace("bar", "bar") : /*#__INLINE__*/ endsWith(a, "123") ? a.replace("123", "123") : a }
terser output or error
const endsWith = (s, t) => s.endsWith("123"); export const test = a => { return "foo", a.endsWith("foo") ? a.replace("foo", "foo") : (s = a).endsWith("123") ? a.replace("bar", "bar") : ((s, t) => s.endsWith("123"))(a) ? a.replace("123", "123") : a; var s; };
(I add some \n before :)
\n
:
Expected result
const endsWith = (s, t) => s.endsWith("123"); export const test = a => { return "foo", a.endsWith("foo") ? a.replace("foo", "foo") : (s = a).endsWith("bar") ? a.replace("bar", "bar") : ((s, t) => s.endsWith("123"))(a) ? a.replace("123", "123") : a; var s; };
The difference is the 2nd branch: "bar" in endsWith(...) should be not "123" but "bar"
"bar"
endsWith(...)
"123"
Some notes
I think this has a same root cause just like #1022 .
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Bug report or Feature request? Bug
Version (complete output of
terser -V
or specific git commit) 5.7.1, and 5.7.1 with PR #1036Complete CLI command or
minify()
options usednpx terser -f beautify -c passes=2 a.js
terser
inputterser
output or error(I add some
\n
before:
)Expected result
The difference is the 2nd branch:
"bar"
inendsWith(...)
should be not"123"
but"bar"
Some notes
I think this has a same root cause just like #1022 .
The text was updated successfully, but these errors were encountered: