Skip to content

Import discrepancy in Node's ESM/CJS interop #657

@steelbrain

Description

@steelbrain

Acknowledgements

  • I read the documentation and searched existing issues to avoid duplicates
  • I understand this is a bug tracker and anything other than a proven bug will be closed
  • I understand this is a free project and relies on community contributions
  • I read and understood the Contribution guide

Minimal reproduction URL

https://github.com/steelbrain/2024-09-tsx-bug-repro

Problem & expected behavior (under 200 words)

Hey Team! Really confused by the output of tsx changing based on package.json#type instead of tsconfig.json. Please have a look at the repro repository. It's possible that this isn't a bug in tsx and is a behavior coming in from esbuild.

Either way, would love to hear based on your experience why this is happening and any pointers on how we could mitigate the impact. I burned through some solid time trying to isolate the bug that led me here. Happy to do a PR (if someone can walk me through it) or financially sponsor a fix here.

Bugs are expected to be fixed by those affected by it

  • I'm interested in working on this issue

Compensating engineering work will speed up resolution and support the project

  • I'm willing to offer $10 for financial support

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions