The project was generated via angular CLI. I have the following folder structure:
I want to define a path to a bar folder in tsconfig.app.json and import Car
to Garage
.
My tsconfig.app.json:
{
"extends": "../tsconfig.json",
"compilerOptions": {
...
"baseUrl": "./",
"paths" : {
"@bar" : ["foo/bar"]
},
...
},
...
}
My Garage.ts:
import { Car } from "@bar/Car";
export class Garage {}
In garage.ts I have an error:
Cannot find module '@bar/car'.
paths
quite elaborately – BilestoneCar
module can not be resolved in that particular example ? – Douglas