privatenumber / tsx

⚡️ TypeScript Execute | The easiest way to run TypeScript in Node.js
https://tsx.is
MIT License
9.77k stars 154 forks source link

Broken dynamic imports. #651

Closed psznm closed 2 months ago

psznm commented 2 months ago

Acknowledgements

Minimal reproduction URL

https://github.com/psznm/tsx-dynamic-import-bug-repro

Problem & expected behavior (under 200 words)

As described in README of the repro repository. Dynamic imports seem to not respect relative paths and always resolve to the first loaded module with same "name" even if it is actually different modules in different directories.

Bugs are expected to be fixed by those affected by it

Compensating engineering work will speed up resolution and support the project

privatenumber commented 2 months ago

Strange bug! Nice find, and thanks for the minimal reproduction

privatenumber commented 2 months ago

This issue is now resolved in v4.19.1.

If you're able to, your sponsorship would be very much appreciated.