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`

3 comments
Comment actions Permalink

This should normally work

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

0
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
/apps/MyApp
/apps/MyApp/src <- source (where I shortcut 'Go To' from)
/apps/MyApp/lib <-- compiled

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



0
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?

0

Please sign in to leave a comment.