Skip to content
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

fix: interop modules with primitive default export #343

Merged
merged 1 commit into from
Nov 29, 2024
Merged

Conversation

pi0
Copy link
Member

@pi0 pi0 commented Nov 29, 2024

resolves #342

interop proxy was giving up on modules with a default export that is primitive (number, boolean, etc). Since it is not object-like to be merged.

However in cases where a native ESM module has default export, we need to preserve a proxy shape with __esModule hint for compact and only provide default via .default accessor.

This change might make regression for certain cases that babel does not adds internal wrapper, please report in that case.

@pi0 pi0 self-assigned this Nov 29, 2024
@pi0 pi0 merged commit cca319b into main Nov 29, 2024
7 checks passed
@pi0 pi0 deleted the fix/interop-primitive branch November 29, 2024 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ES modules with primitive default export issue with static import
1 participant