This is a demo project to describe the issue from this link: https://youtrack.jetbrains.com/issue/WEB-62884
- open the
library
folder in one IDE window - open the
project
folder in another IDE window $ npm install
inlibrary
- copy the
library/package.json
inlibrary/build/package.json
$ npm link
inlibrary/build
$ npm link library
inproject
$ npm install
inproject
. Issue 1: Try to open the definition formyFunction
. Notice how the cursor jumps to the import statement instead of jumping directly to the .ts file
Issue 2:
Try to remove the import from project/index.ts
and use the IDE to import it again. Notice the weird import statement: import { myFunction } from '../library/build'
. It should be just import { myFunction } from 'library'
: