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

Go-to-definition doesn't work with .native.js file extensions #45715

Closed
megantracy93 opened this issue Mar 13, 2018 · 4 comments
Closed

Go-to-definition doesn't work with .native.js file extensions #45715

megantracy93 opened this issue Mar 13, 2018 · 4 comments
Assignees
Labels
javascript JavaScript support issues

Comments

@megantracy93
Copy link

I'm working in a react + react-native project, so I have .jsx files for web components and .native.js for native components. The problem is, ctrl+click only works for my .jsx files and none of my .native.js files. Is there any way to add support for files with additional extensions like that? Or is there an additional configuration I am missing to already support this?

  • VSCode Version: 1.17.2
  • OS Version: macOS Sierra 10.12.6

Steps to Reproduce:

  1. Create a file with an extra extension, i.e. src/components/Tester.native.js
  2. Import that Tester into another file via ./src/components/Tester
  3. Ctrl+click into the Tester component. Note that it does NOT open the file.

Does this issue occur when all extensions are disabled?: Yes

@vscodebot vscodebot bot added the javascript JavaScript support issues label Mar 13, 2018
@mjbvz
Copy link
Collaborator

mjbvz commented Mar 14, 2018

Please link to a small example project or include code examples showing the project structure and imports

@mjbvz mjbvz added the info-needed Issue requires more information from poster label Mar 14, 2018
@klingat
Copy link

klingat commented Mar 19, 2018

Also experiencing this, but across the editor in all files.

Suddenly noticed that "Go to definition and peek definition" are gone when right clicking on the piece of code. Early last week I noticed it was gone, then by Friday it was back, now this Monday morning it is gone again. My coworker working on completely different code is using VS code as well and is experiencing the same issue.

Does this issue occur when all extensions are disabled?: Yes

@kkrishnan90
Copy link

Yes its weird ! I have an iMac and Macbook which runs the same version of vscode Version 1.22.2 (1.22.2)
Unfortunately, the peek definition and go to doesn't work on my Macbook, while it works on my iMac.
I am developing a react-native application on both. Seems to work with Cmd+Click on my iMac. The same key combination doesn't work on my Macbook.

P.S : I use Settings Sync and synced both my iMac and Macbook vscode settings. So ideally, nothing should have changed between them.

@mjbvz mjbvz removed the info-needed Issue requires more information from poster label May 8, 2018
@mjbvz
Copy link
Collaborator

mjbvz commented May 8, 2018

Ok, I undestand this issue better now. It is the same as microsoft/TypeScript#8328 / microsoft/TypeScript#21926 were TS needs to resolve a.ts to a.native.ts

Closing this as an upstream typescript issue

@mjbvz mjbvz closed this as completed May 8, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Jun 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
javascript JavaScript support issues
Projects
None yet
Development

No branches or pull requests

4 participants