Open nichtsam opened 3 months ago
Oh good catch. The __esModule
property should be ignored if the file is .cjs
.
This will be pretty complex to handle since it should handle:
import('./file.cjs')
import('#file')
where #file
maps to file.cjs
import('file')
where file
maps to file.cjs
Feel free to open a PR with a test first, but I think this will be very challenging and may have to be resolved with https://github.com/privatenumber/tsx/issues/614
Acknowledgements
Minimal reproduction URL
https://github.com/nichtsam/tsx-import-differently
Problem & expected behavior (under 200 words)
Skip this section and let your reproduction do the talking...
But if you really need to explain, keep it under 200 words:
Bugs are expected to be fixed by those affected by it
Compensating engineering work will speed up resolution and support the project