ts-jest-resolver
ts-jest-resolver copied to clipboard
Support require without extension
All of our TypeScript code uses imports without extensions. Example:
import * as module from './module';
This works because our code is in CommonJS; at compile time, TypeScript will know to look for module.ts or module.d.ts, at run-time Node will look for module.js.
Currently, ts-jest-resolver will not handle paths without extensions correctly: it will only replace known extensions with different ones, not try to add extensions to unqualified files.
I can write a PR to add this behavior. Would you accept it if I did?
Just do it.™