Hey there! I'm facing an issue with Angular not recognizing a custom path I added to my tsConfig file. It seems like Angular already has a baseUrl
property set to ./
, starting from the current folder where the tsConfig file is located. The code snippet I added looks like this:
"paths": {
"@interfaces/*": ["src/app/interfaces/*"]
}
Unfortunately, when I try to import it into a component, I get a TS2307 error. Here's how my entire ts.config file looks like:
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"downlevelIteration": true,
"experimentalDecorators": true,
"module": "esnext",
"moduleResolution": "node",
"importHelpers": true,
"target": "es2015",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2018",
"dom"
],
"paths": {
"@interfaces/*": ["src/app/interfaces/*"]
}
},
"angularCompilerOptions": {
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true
}
}
Any suggestions on what steps I should take to resolve this and make it work?