How do I 'Go To Type Declaration' of the source?

I am running a monorepo and have `/packages` that get compiled to `/node_modules`. Is there anyway to tell WebStorm where the source for these libraries are so that when I hit my shortcut for `Go To Type Declaration` it takes me to the source rather than deep into `/node_modules`

Comment actions Permalink

This should normally work

Could you share a test repo theissue can be repeated with?

Comment actions Permalink

Maybe I can find the time at some point but that would be significant work. A quick description... It is a monorepo with expo, expo-yarn-workspaces and yarn2.

/apps/MyApp/src <- source (where I shortcut 'Go To' from)
/apps/MyApp/lib <-- compiled

/packages/MyPackage/src <- source (where I want to go)
/packages/MyPackage/lib <-- compiled
/node_modules/MyPackage/src <- source
/node_modules/MyPackage/lib <-- compiled (where I end up)

Comment actions Permalink

Elena Pogorelova

Any chance you could explain or share documentation on how it works? `main` in the `package.json` points to a compiled `index.js`. Is the source directory supposed to be defined in `package.json` as well?


Please sign in to leave a comment.