TypeScript: Intellisense, navigation (ctrl+click) stops working for react-native projects

From @miqmago on April 30, 2016 11:15

  • VSCode Version: 1.1.0-insider
  • OS Version: 10.10.5

In a react-native project, in this issue https://github.com/facebook/react-native/issues/3099#issuecomment-163567498 it is suggested to follow this steps in order to avoid ../../../../.. paths in requires:

package.json:

{
  "name": "@whatever"
}

(or without @ it works too) Then in your files you can load a package like this:

import MyComponent from '@whatever/components/myComponent';

The problem with this is that navigation (ctrl+click), intellisense, etc. stops working

Copied from original issue: Microsoft/vscode#6015

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 23 (11 by maintainers)

Most upvoted comments

package.json / name is not supported at the moment. That said one can use baseUrl : '.' and paths: : https://github.com/Microsoft/TypeScript/issues/5039#rootDirs

I haven’t looked at baseUrl / paths myself yet. Will try and write up sometime simple (but incomplete) for the TypeScript deep dive 🌹