The repo reproduces the issue where import-meta-resolve
package fails to resovle a TypeScript file when provided extension has .js
.
node -v
# v19.5.0
There are two files in this repo.
main.ts
- Uses theimport-meta-resolve
packagemain-native.ts
- Uses theimport.meta.resolve
API.
Run the examples as follows to reproduce the issue.
node --loader=ts-node/esm --experimental-import-meta-resolve main-native.ts
node --loader=ts-node/esm main.ts