-
-
Notifications
You must be signed in to change notification settings - Fork 374
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
Cached variables can lead to incorrect toplevel trasnpilation #165
Comments
I've created a repository with this bug reproducible: https://github.com/ma2ciek/terser-bug. |
Thanks for the detailed bug report. Initially I thought that the
I have a fix for this. |
Other bug variations:
Any other failing scenarios? |
Okay, I have a more general fix that should handle all export declaration scenarios. |
Thanks for the quick fix! It works perfectly on that branch for our needs. I've tested it on our codebase and no error has occured after the minification. |
Bug report or Feature request?
Bug
Version (complete output of
terser -V
)3.10.11
Complete CLI command or
minify()
options usedterser
inputterser
output or errorExpected result
The original exported
add
function should stay as it is. Eventually, its name should be transformed along with all its occurrences in imports.The text was updated successfully, but these errors were encountered: