-
-
Notifications
You must be signed in to change notification settings - Fork 62
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
File extension substitution is not working #275
Comments
Sorry I'm focusing on un-ts/eslint-plugin-import-x#41 recently, so I don't have enough time to investigate in depth. We're using |
Got it @JounQin , but just quickly: Does the resolver not do file extension substitution, like TS does? |
I believe it depends on See also https://github.com/import-js/eslint-import-resolver-typescript/blob/master/src/index.ts#L39-L60 We have othe resolutions for path mapping at
|
@JounQin I looked into it and can confirm that it is indeed |
Hi,
Thanks for a solid resolver. I am having an issue though, please see below.
According to the ts docs:
However, the below file and corresponding package.json (minimal repo here) throws this error:
File Excerpts
I am using
"typescript": "5.5.0-dev.20240314"
. Typescript finds the file, so it is only the import resolver that cannot find it.The error disappears if we change
.js
to.tsx
inpackage.json
, however that is not recommended practice. The TypeScript docs are very clear on the point that the package config should point to the output JS file(s), not the input TS files. Otherwise, the app might not work runtime, when consumed.Any idea what is going on?
The text was updated successfully, but these errors were encountered: