-
-
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
Evaluate export default beforehand #1568
Comments
How did you get the output of swc? |
I think I can fix it without reproduction. I was wrong. I need more context. |
Ah right, I forgot to put the module type. It should be "commonjs". |
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
Currently export should be evaluated beforehand to avoid undefined if bundled using webpack. Refer to this issue webpack/webpack#7767.
Input code
Config
Expected behavior
Babel sample output:
Version
The version of @swc/core: 1.2.51
Additional context
If we change the export this way, it would work normally as expected.
SWC output (changed the export as described above) (works):
Current SWC output (doesn't work):
The text was updated successfully, but these errors were encountered: