-
-
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
Eval breaks imports #6070
Comments
Please fill the input forms. Also, please provide a repro case which does not involve 3rd-party library |
@kdy1 I have updated the repro for the inputs forms, you want me to put in the code content from the repro? |
Closing as duplicate of #5068 |
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
Seems like eval used in a function, even if the function is never used, breaks imports in the file.
Here is the repro repository
https://github.com/Smrtnyk/swc-modules-import-repro
clone it, run
npm install
and thennpm run transpile
I have put a break point and seems like only one import is considered
if you remove the
evaluatedCodeWrapper
function from the code, then it works againseeems like problem is the
eval.call
lineThis is blocking our upgrade of swc 1.197 to 1.3.4
Input code
No response
Config
No response
Playground link
No response
Expected behavior
eval.call in unused function should not break imports
Actual behavior
No response
Version
1.3.4
Additional context
No response
The text was updated successfully, but these errors were encountered: