privatenumber / tsx

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

[Regression] ESM module import using the # import pattern no longer works since 4.12.0 #579

Closed FredTreg closed 3 weeks ago

FredTreg commented 3 weeks ago

Acknowledgements

Minimal reproduction URL

https://stackblitz.com/edit/node-c5jsr8

Problem & expected behavior (under 200 words)

The stackblitz will work if moving back to tsx 4.11.2

Basically using

"imports": {
    "#*": {
      "production": "./dist/*",
      "default": "./src/*"
    }
  },

in package.json no longer works in 4.12.0

I assume commit https://github.com/privatenumber/tsx/commit/72d08965f9f1dd348b6017520ad63bc8373edc72 is responsible for the issue as a path starting with '#' may not be considered a unix path?

Bugs are expected to be fixed by those affected by it

Compensating engineering work financially will speed up resolution

privatenumber commented 3 weeks ago

:tada: This issue has been resolved in v4.13.3

If you appreciate this project, please consider supporting this project by sponsoring :heart: :pray: