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

Regression: @swc-node/register@1.8.0 doesn't handle default exports properly #752

Closed
mitchhentgesspotify opened this issue Feb 2, 2024 · 0 comments

Comments

@mitchhentgesspotify
Copy link

mitchhentgesspotify commented Feb 2, 2024

To reproduce

See this reproduce repo I made for you

Details

Before, doing import fs from 'fs-extra' would indeed get you the fs module.
Now, fs is undefined (though import { nonDefaultExport } from 'example-package' still appears to work).

I don't know how exactly "default" imports work with .cjs, so I'm not sure what the specific issue is here.

Workaround

Use @swc-node/register@1.6.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants