Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support require without extension #6

Open
rix0rrr opened this issue Aug 23, 2023 · 1 comment
Open

Support require without extension #6

rix0rrr opened this issue Aug 23, 2023 · 1 comment

Comments

@rix0rrr
Copy link

rix0rrr commented Aug 23, 2023

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?

@Creative-Difficulty
Copy link

Just do it.™

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants