I have added a custom path in my Angular 9 's tsconfig.base.json and all the components and everything are loading perfectly. But visual Studio Code is complaining and throwing the error Can not find module in my app routing module and app module. How to resolve this issue.
tsconfig.base.json -
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"paths": {
"@/*": ["src/app/*"],
"@env/*": ["src/environments/*"]
},
"outDir": "./dist/out-tsc",
"sourceMap": true,
....
}
App module -
import { AppRoutingModule, routingComponents } from '@/app-routing.module';
import { AppComponent } from '@/app.component';