I'm fairly new to Aurelia so please be gentle with me if this is an obvious question or even something one should not consider doing. From reading the documentation and various resources on the web this does not seem to be addressed anywhere.
As my project increased in size I restructured folders and files. While refactoring it felt a bit cumbersome, as to check the correct depth of the path, and also when I moved view models I needed to change the import path as well.
Currently I need to import certain files in my view models as:
import {log} from './../../services/log';
What I would find more comfortable would be to have a relative path starting from the root of the project like:
import {log} from 'services/log';
Is there anything I'm missing or simply not understanding? I know that with the ./ the relative path from the current file is specified.
Update:
I tried the same with the Aurelia Contact Manager Tutorial where all files in the src folder are on the same level. If I move the 'wep-api.ts' file into a 'src/services' folder and want to import that file from a viewmodel inside 'src/components/users' I need to use the import as
import {WebAPI} from './../../services/web-api';
It does not seem to work with only 'services/web-api' and the error is
[ts] cannot find module 'services/web-api'
The aurelia.json file includes
"paths": {
"root": "src", ...