privatenumber / tsx

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

`import()` in CommonJS creates a different copy module #589

Open jochenschmich-aeberle opened 3 months ago

jochenschmich-aeberle commented 3 months ago

Acknowledgements

Minimal reproduction URL

https://github.com/jochenschmich-aeberle/tsx-dynamic-import-error

Problem & expected behavior (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

privatenumber commented 3 months ago

Duplicate of https://github.com/privatenumber/tsx/issues/499

BTW for the minimal reproduction, just the cjs directory suffices.

jochenschmich-aeberle commented 3 months ago

@privatenumber Thanks! Will this eventually be fixed? Judging from the other issue, there's no clear solution yet. What also struck me, is that my example works in versions of tsx < 12 and the issue was already mentioned back in March.