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
For input
let o = { f() { assert.ok(this !== o); } }; (1, o.f)(); (1, o.f)``; (true && o.f)(); (true && o.f)``; (true ? o.f : false)(); (true ? o.f : false)``;
Esbuild's output
let o={f(){assert.ok(this!==o)}};(0,o.f)(),(0,o.f)``,(0,o.f)(),(0,o.f)``,(0,o.f)(),(0,o.f)``;
https://esbuild.github.io/try/#dAAwLjIzLjAALS1taW5pZnkAbGV0IG8gPSB7CglmKCkgewoJCWFzc2VydC5vayh0aGlzICE9PSBvKTsKCX0KfTsKKDEsIG8uZikoKTsKKDEsIG8uZilgYDsKCih0cnVlICYmIG8uZikoKTsKKHRydWUgJiYgby5mKWBgOwoKKHRydWUgPyBvLmYgOiBmYWxzZSkoKTsKKHRydWUgPyBvLmYgOiBmYWxzZSlgYDs
Oxc's output
let o = {f() { assert.ok(this !== o); }}; (1, o.f)(); (1, o.f)``; o.f(); o.f``; (!0 ? o.f : !1)(); (!0 ? o.f : !1)``;
https://oxc-project.github.io/oxc/playground/?code=3YCAAIAbgICAgICAgIC2mcpqpUVBuJ3I%2BHiR31d004qj5Bgli8IXp4uXuyULHD9UOmdTBRJYluRQbf8p3kvgYoXFzfbW6%2BJ5XvxWlXKndcO6VfFc%2BARAdtxe7ZllDHqLf%2F0dYTa9eCxUx6PSbiS%2FfcMYwA%3D%3D
In short, (true && o.f)``; is simplify to o.f`` , which causes this pointing to a wrong object..
Related:
The text was updated successfully, but these errors were encountered:
rollup@function@sequence-expressions-template-tag
fix(minifier): temporarily bail constant folding for tagged template
8784016
closes #4341
fix(minifier): temporarily bail constant folding for tagged template (#…
fae8a62
…4842) closes #4341
Oh this is harder than I thought ... the above PR doesn't fix call expressions :-/ I'll revisit this sometime in the future.
Sorry, something went wrong.
refactor(minifier): align code with closure compiler
16d7501
also fixes #4341
refactor(minifier): align code with closure compiler (#5717)
746f7b3
Boshen
Successfully merging a pull request may close this issue.
For input
Esbuild's output
https://esbuild.github.io/try/#dAAwLjIzLjAALS1taW5pZnkAbGV0IG8gPSB7CglmKCkgewoJCWFzc2VydC5vayh0aGlzICE9PSBvKTsKCX0KfTsKKDEsIG8uZikoKTsKKDEsIG8uZilgYDsKCih0cnVlICYmIG8uZikoKTsKKHRydWUgJiYgby5mKWBgOwoKKHRydWUgPyBvLmYgOiBmYWxzZSkoKTsKKHRydWUgPyBvLmYgOiBmYWxzZSlgYDs
Oxc's output
https://oxc-project.github.io/oxc/playground/?code=3YCAAIAbgICAgICAgIC2mcpqpUVBuJ3I%2BHiR31d004qj5Bgli8IXp4uXuyULHD9UOmdTBRJYluRQbf8p3kvgYoXFzfbW6%2BJ5XvxWlXKndcO6VfFc%2BARAdtxe7ZllDHqLf%2F0dYTa9eCxUx6PSbiS%2FfcMYwA%3D%3D
In short, (true && o.f)``; is simplify to o.f`` , which causes this pointing to a wrong object..
Related:
The text was updated successfully, but these errors were encountered: