Search Terms
Why explicit extension
Explicit import extension seems the ONLY convenient way to write dual module in typescript, supported by tsc.
Expected Behavior
Actual Behavior
$ ts-node a.ts
Error: Cannot find module './b.js'
Steps to reproduce the problem
Minimal reproduction
// a.ts
import b from './b.js'
console.log(b)
// b.ts
export default 42
Specifications
- ts-node version:
- node version:
- TypeScript version:
- tsconfig.json, if you're using one:
- Operating system and version:
- If Windows, are you using WSL or WSL2?:
Search Terms
Why explicit extension
Explicit import extension seems the ONLY convenient way to write dual module in typescript, supported by
tsc.Expected Behavior
$ ts-node a.ts 42Actual Behavior
$ ts-node a.ts Error: Cannot find module './b.js'Steps to reproduce the problem
Minimal reproduction
Specifications