I've decided to use my own absolute paths in angular2 in order to avoid this kind of path references:
import someThing from "../../../../../somePath"
I'm using systemjs. My own mappings declared at systemjs.config.js:
var map = {
....
"@services": "app/services",
"@pipes": "app/pipes"
};
Everything works fine on the browser, without errors. The files are being imported correctly. But typescript compiler throws some errors:
error TS2307: Cannot find module '@services/SomeService.service'.
But, off course, imports like @angular/core
work fine, so it's possible to solve this.
Something like this maybe:
"paths": {
"baseUrl": "./",
"*": [
"app/*",
"app/main/*"
]
}
The above should be in tsconfig.json