I have put together an example of chain-loading dd-trace and ts-node/esm in a native ESM project without compiling TS to JS here. However, to make it work, I had to patch import-in-the-middle.
Actual Behavior
Without the patch, MITM does not recognize TypeScript extensions (i.e. .ts, .mts, .cts).
Steps to Reproduce the Problem
Clone the example repo
Install the dependencies by running npm i --ignore-scripts
Expected Behavior
I have put together an example of chain-loading
dd-trace
andts-node/esm
in a native ESM project without compiling TS to JS here. However, to make it work, I had to patchimport-in-the-middle
.Actual Behavior
Without the patch, MITM does not recognize TypeScript extensions (i.e.
.ts
,.mts
,.cts
).Steps to Reproduce the Problem
npm i --ignore-scripts
npm test
Specifications