-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Relay Resolver has module resolution problem in TypeScript #3989
Comments
The Relay Resolvers is still in active development, and typescript support maybe lacking in some places. Thanks for reporting! |
Thanks for the report @beingbook. If you're interested in working on a fix, I suspect stripping the extension would be the right approach and the I think the code that derives this path lives here: https://github.com/facebook/relay/blob/main/compiler/crates/relay-config/src/project_config.rs#L360 cc @tbezman |
oops, I'm too late. thank you for suggesting contribution! I want to work if there's next time. |
This was not fixed in 14.1 - the dynamic imports in the AST omit extensions, however the type imports still have the extensions. It appears that
and
Both also need to strip extensions, as typescript requires that extensions not be provided. Is it possible to re-open this? I'm happy to work on a fix. |
I went ahead and created a new issue: |
As above images, generated relay artifacts import relay resolver with extension.
I think using ".js" extension or skipping extension are correct solution at this moment. So we can inference return type of RelayResolver function in TypeScript.
The text was updated successfully, but these errors were encountered: