Open OlivierCuyp opened 3 months ago
Facing the same issue, I don't understand why the transpilation to esm and commonjs
was replaced by a transpilation that targets ESM
but that uses module commonjs
. In my opinion the code should be using ESM
modules as it's the new standard. And optionally could still have a commonjs transpiled version as it was setup previously.
With previous the version 2, I had no issue using this package with tsx or ts-node targeting esm. Now with version 3, convert is not a function but an object with a default key containing the function. Here is what I mean:
Below the steps to reproduce in Node v20.11.1.
Install:
package.json:
test.ts:
tscong.json:
Run with tsx:
Run with ts-node: