-
-
Notifications
You must be signed in to change notification settings - Fork 160
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
Unable to import a synthetic named export in a CJS file from ESM #67
Comments
This is expected behavior. The file is declared CommonJS via Changing the This may be inevitably supported when fixing #38 |
cjs
from esm
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Looked into this deeper, and I think should work based on TypeScript working: https://stackblitz.com/edit/stackblitz-starters-myqskv?file=b.mjs However, this is a limitation in Node so it's very similar to #427 |
Bug description
What did you expect to happen?
Supports default imports even for
cjs
.What happened instead?
Default imports are retrieved at object.
Reproduction
CommonJS
using tsclink for generated script
cjs
fromesm
mts
Environment
System: OS: macOS 10.15.7 CPU: (8) x64 Intel(R) Core(TM) i7-3720QM CPU @ 2.60GHz Memory: 136.99 MB / 16.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 16.15.1 - /usr/local/bin/node npm: 8.11.0 - /usr/local/bin/npm npmPackages: tsx: ^3.8.0 => 3.8.0
Can you contribute a fix?
The text was updated successfully, but these errors were encountered: