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
index.js
function foo(bar) { bar.prop = 12; } function main(obj) { try { foo(obj); } catch (e) { console.error(e); } } main({});
rollup.config.js
export default { input: 'index.js', treeshake: { tryCatchDeoptimization: false, }, output: { format: 'es', file: 'output.js' } };
Also, included a small repo case, just:
rollup-bug.zip
npm i npm run build
and inspect the output.js file
output.js
The parameter passed to the foo functions should not be treeshaken, since it's actually used.
foo
function main(obj) { try { foo(obj); } catch (e) { console.error(e); } }
function main(obj) { try { foo(); } catch (e) { console.error(e); } }
making it crash at runtime, since foo expects an argument
The text was updated successfully, but these errors were encountered:
Fix at #2914. Turns out it was a simple oversight in TryStatement that could have caused even more mayhem, thanks for spotting and reporting it!
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
How Do We Reproduce?
index.js
rollup.config.js
Also, included a small repo case, just:
rollup-bug.zip
and inspect the
output.js
fileExpected Behavior
The parameter passed to the
foo
functions should not be treeshaken, since it's actually used.Actual Behavior
making it crash at runtime, since foo expects an argument
The text was updated successfully, but these errors were encountered: