-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
top-level eval
breaks the variable renamer
#5068
Comments
This bug was initially introduced by |
Yeah, I know the cause. I think we should force renaming if we have duplicate declaration. |
eval
breaks the variable renamer
This can be fixed by creating a new mark (named |
This issue also comes up when using the |
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Describe the bug
When using
eval()
with styled-components, it generates duplicated_templateObject
functions.Input code
Config
Playground link
https://play.swc.rs/?version=1.2.207&code=H4sIAAAAAAAAA5XLuwqAMAyF4T1Pka06KOhocfJFvDRKoTZiYsG3V1Bwdjz85%2FPrxrui6BnI4bzziuYZxcR3ixRVjAWYOIpiV2H7nkvnUw%2BIG4tXz7HBYRQOh5KF%2FgP1T%2BBoPJbbUBpCZkxu4QJigxVtowAAAA%3D%3D&config=H4sIAAAAAAAAA0WOSw7DIAxE7%2BJ1tu2CO%2FQQiDoRFT95HKkIcfcCSpXdaGb8PI0%2BcGQaFStgmQo1qf2SIa2F4cQXpY0Uw1I5uQ9t5WAdDcZjRCFnMJndBvBG0Se%2F1wlyORZh4I5sOsK%2F2Qco5vc5jbZ%2BLeCT%2Bs247jxeV3EN%2BAFJDkBftAAAAA%3D%3D
Expected behavior
It should not output duplicated function name:
_templateObject
.Actual behavior
It generates duplicated
_templateObject
:Version
1.2.207
Additional context
No response
The text was updated successfully, but these errors were encountered: