You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am not sure about the root of the problem, but we hit the issue when we try to treeshake part of the stencil's runtime using a object of constant booleans.
For now this is an ordering issue. If you switch the order of the definitions of foo and bar, it will work correctly. Will check if there is a simple way of improving it without introducing a second bind pass...
How Do We Reproduce?
I am not sure about the root of the problem, but we hit the issue when we try to treeshake part of the stencil's runtime using a object of constant booleans.
https://rollupjs.org/repl?version=1.9.0&shareable=JTdCJTIybW9kdWxlcyUyMiUzQSU1QiU3QiUyMm5hbWUlMjIlM0ElMjJtYWluLmpzJTIyJTJDJTIyY29kZSUyMiUzQSUyMmNvbnN0JTIwQlVJTEQlMjAlM0QlMjB0cnVlJTNCJTVDbiU1Q25leHBvcnQlMjBjb25zdCUyMGJhciUyMCUzRCUyMCgpJTIwJTNEJTNFJTIwJTdCJTVDbiUyMCUyMCUyMCUyMGNvbnNvbGUubG9nKGZvbygpKSUzQiU1Q24lN0QlM0IlNUNuJTVDbmNvbnN0JTIwZm9vJTIwJTNEJTIwKCklMjAlM0QlM0UlMjAlN0IlNUNuJTVDdHJldHVybiUyMEJVSUxEJTIwJTNGJTIwQSUyMCUzQSUyMEIlM0IlNUNuJTdEJTNCJTIyJTJDJTIyaXNFbnRyeSUyMiUzQXRydWUlN0QlNUQlMkMlMjJvcHRpb25zJTIyJTNBJTdCJTIyZm9ybWF0JTIyJTNBJTIyZXNtJTIyJTJDJTIybmFtZSUyMiUzQSUyMm15QnVuZGxlJTIyJTJDJTIyYW1kJTIyJTNBJTdCJTIyaWQlMjIlM0ElMjIlMjIlN0QlMkMlMjJnbG9iYWxzJTIyJTNBJTdCJTdEJTdEJTJDJTIyZXhhbXBsZSUyMiUzQW51bGwlN0Q=
Replacing
BUILD
withtrue
directly, removes the dead-code properly.Expected Behavior
Input:
Should generate
Actual Behavior
The constant expression is not dropped
The text was updated successfully, but these errors were encountered: