I am new to Aurelia, so please be careful with me if this is an obvious question or even something you should not think about. From reading documentation and various resources on the Internet, this seems to be nowhere to be seen.
As my project grew in size, I was restructured by folders and files. During refactoring, it looked a bit cumbersome to check the correct depth of the path, and also when I moved the view models, I also needed to change the import path.
Currently, I need to import certain files into my view models:
import {log} from './../../services/log';
What would be more convenient for me would be to have a relative path starting from the root of the project, for example:
import {log} from 'services/log';
Is there something I donβt see or just donβt understand? I know that with ./ the relative path from the current file is specified.
Update:
I tried the same with the Aurelia Contact Manager Tutorial, where all the files in the src folder are on the same level. If I transfer the file 'wep-api.ts' to the src / services folder and want to import this file from viewmodel inside 'src / components / users', I need to use import as
import {WebAPI} from './../../services/web-api';
It seems to work only with "services / web-api", and the error
[ts] cannot find module 'services/web-api'
The aurelia.json file includes
"paths": { "root": "src", ...