I have developed client side and server side library for several of my projects and I want to use tha main copy of them in several of my projects. The problem is unlike Java JS depends on path.
So I decided to put all projects and libraries in one project so refactoring libraries affects all projects, for NodeJs modules it's possible to use root library directly although path becomes so ugly, but for client side it get so confusing because imports become like this "../../../../lib/file.js", so I decided to add required symlink from project sub directories to libraries folder. But there are several problems:
- Webstorm treats them as a copy not just a link and suggest adding the import path from all of them.
- If I exclude the symlinks Webstorm will add import path from library several directory up instead of symlink.
- If I exclude lib directory refactoring is broken.
There must be a mechanism in WebStorm to work with shared files like Java.