I've started an angular 7 project and I'm trying to configure the "path mapping" on angular.json to change my import way from this:
import { environment } from '../../../environments/environment';
to this:
import { environment } from '@environments/environment';
I've done this config on the root level tsconfig.json file:
"compilerOptions": {
"baseUrl": "src", // This must be specified if "paths" is.
...
"paths": {
"@app/*": ["app/*"],
"@config/*": ["app/_config/*"],
"@environments/*": ["environments/*"],
"@shared/*": ["app/_shared/*"],
"@helpers/*": ["helpers/*"]
},
...
But I also get this error on the cli
ERROR in src/app/errors/not-foud/not-found.component.ts(2,29): error TS2307: Cannot find module '@environments/environment'
Is there something I'm missing?