Like it works in C# / Java e.t.c, where you don't have to worry about the location of the file, the compiler will be responsible for correctly resolving the dependencies...
At the moment relative paths are used for JavaScript modules import something from '../../../../Something'
and that long path can be resolved using configurations in webpack and/or gulp e.t.c, but it is still vulnerable to file location change. So if there is a module being used in many other files moving it is not an option, better to duplicate and use new path for other files and slowly refactor the old ones.
Is there any solution to this? Am i missing something or thinking about in the wrong way? (I tried TypeScript namespaces but they don't act like this, weren't what i expected, and i'm not that into using languages that compile to JS)