How the Project Graph is Built
Nx creates a graph of all the dependencies between projects in your workspace using three sources of information:
- Package dependencies defined in the - package.jsonfile for each project.- If the - myapp/package.jsonfile has this dependency:myapp/package.json- 1{ 2 "dependencies": { 3 "@myorg/awesome-library": "*" 4 } 5} 6- Then - my-appdepends on- awesome-library.- Note: We typically use - *for the dependency instead of a specific version because we want to depend on the version of the library as it currently exists in the repo.
- Typescript - importstatements referencing a particular project's path alias- For instance, if a file in - my-apphas this code:- 1import { something } from '@myorg/awesome-library'; 2- Then - my-appdepends on- awesome-library- This can be turned on or off with the - analyzeSourceFilesflag.
- Manually created - implicitDependenciesin the project configuration file.- If your project configuration has this content: 
1{
2  "name": "myapp",
3  "nx": {
4    "implicitDependencies": ["some-api"]
5  }
6}
7Then my-app depends on some-api.