New issue
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
Treeshaking pure external functions #1829
Comments
@lukastaegert a |
@basav22: The issue is that rollup will always assume that external functions (which includes tag functions of tagged template literals as in this example) have side-effects. Both the definitions of the "primary" and the "default" button call the function "styled.button()" - and this function is called when the module is initialised and not when the buttons are actually used. @guybedford 's suggestion of adding an option to list pure external function sounds good to me. Additionally, we could start supporting UglifyJS In any case I would classify solving this problem as an interesting enhancement. Further suggestions are always welcome. |
I have taken the liberty to slightly adjust the issue title |
i resolved the issue by adding
|
Hey folks. This is a saved-form message, but rest assured we mean every word. The Rollup team is attempting to clean up the Issues backlog in the hopes that the active and still-needed, still-relevant issues bubble up to the surface. With that, we're closing issues that have been open for an eon or two, and have gone stale like pirate hard-tack without activity. We really appreciate the folks have taken the time to open and comment on this issue. Please don't confuse this closure with us not caring or dismissing your issue, feature request, discussion, or report. The issue will still be here, just in a closed state. If the issue pertains to a bug, please re-test for the bug on the latest version of Rollup and if present, please tag @shellscape and request a re-open, and we'll be happy to oblige. |
Hi, I am unable to understand why is dead code (AgroButtonDefault in this case). Please help me understand
Please find below repl -
https://rollupjs.org/repl?version=0.53.2&shareable=JTdCJTIybW9kdWxlcyUyMiUzQSU1QiU3QiUyMm5hbWUlMjIlM0ElMjJtYWluLmpzJTIyJTJDJTIyY29kZSUyMiUzQSUyMmltcG9ydCUyMCU3QiUyMEFncm9CdXR0b25QcmltYXJ5JTIwJTdEJTIwZnJvbSUyMCcuJTJGYnV0dG9uLmpzJyUzQiU1Q24lNUNuZXhwb3J0JTIwJTdCQWdyb0J1dHRvblByaW1hcnklN0QlM0IlMjIlN0QlMkMlN0IlMjJuYW1lJTIyJTNBJTIyYnV0dG9uLmpzJTIyJTJDJTIyY29kZSUyMiUzQSUyMmltcG9ydCUyMHN0eWxlZCUyMGZyb20lMjAlNUMlMjJzdH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