How the Project Graph is Built
Nx creates a graph of all the dependencies between projects in your workspace using two sources of information:
Typescript
import
statements referencing a particular project's path aliasFor instance, if a file in
my-app
has this code:import { something } from '@myorg/awesome-library';
Then
my-app
depends onawesome-library
Manually created
implicitDependencies
in the project configuration file.If your project configuration has this content:
1{
2 "name": "myapp",
3 "nx": {
4 "implicitDependencies": ["some-api"]
5 }
6}
7
Then my-app
depends on some-api