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
Why post function declaration would not be treeshake? #2962
Comments
The problem is probably that the algorithm to determine side-effects of function return values tries to "cache" the return value at an early stage where the function definition has not been properly processed. Marking this as an "enhancement" as the generated code is not broken but could be optimized better. |
I guess static side-effects analysis will always reach limitations for dynamic parts. #5024 introduced the annotation to manually mark functions as side-effects-free, which I think should be able to solve this issue. |
How Do We Reproduce?
Expected Behavior
Both be shaked.
Actual Behavior
Leave this:
The text was updated successfully, but these errors were encountered: