dependsOn

The turbo.json setting that lists which tasks must finish before a task runs, where a leading caret means the same task in every dependency package.

In more detail

dependsOn: ["^build"] tells Turborepo that a package’s build may only start after the build of every workspace package it depends on has finished. Without the caret, the name refers to another task in the same package, such as running codegen before build.

Example

"build": { "dependsOn": ["^build"], "outputs": ["dist/**", ".next/**"] }

Related terms

Taught in

References