PhpStorm 2017.3.4 can resolve the imports in packages/a/src/index.js and packages/b/src/index.js. However, PhpStorm Auto Import feature uses relative paths instead of package based imports. I found several issues about this but I found the instructions quite confusing and nothing I tried really worked for me. What I would like auto import to do is:
- If a module in packages/a imports another module from packages/a then a relative path would be used to import it (../path/to/module).
- If a module in packages/a imports another module from packages/b then a package import would be used (@my/b/path/to/module).
Is this possible? If not are there similar alternatives?
I found something about a jsconfig.json. Do I need this file? If yes, where should I put it to achieve what I want?