• Discover
  • Collections
  • Board
  • Create
  • Profile
  • Settings
Paths

Lesson 3.1: Configuring the `turbo.json` Pipeline in Detail

Lesson 3.1: Configuring the `turbo.json` Pipeline in Detail

2 min read

The turbo.json file is the heart of your Turborepo setup, controlling how tasks are executed. The pipeline object within turbo.json allows you to define configurations for each of your common scripts (e.g., build, test, lint).

Key properties include:

  • dependsOn: Specifies task dependencies. ^build means 'run the build task on all dependencies of this package first.' build means 'run the build task on this package first.' This creates the task graph.
  • outputs: An array of file paths or glob patterns that represent the cached output of a task. If these files are detected in the cache, the task won't re-run.
  • inputs: An array of file paths or glob patterns that Turborepo should use when calculating the hash for a task. This allows you to include or exclude specific files that might affect a task's outcome.
  • cache: A boolean to enable/disable caching for a specific task. Useful for dev scripts that are persistent.
  • persistent: A boolean for tasks that should run continuously (e.g., a development server).
  • dotEnv: An array of .env file names to include in the task's hash. This ensures environment variable changes invalidate the cache.

Mastering these properties allows you to finely tune caching behavior and task execution logic, dramatically enhancing your monorepo's performance.

End of lesson
👏Well done!
Previous Lesson
Quiz: Module 2: Introducing Turborepo - The High-Performance Build System
Next Lesson
Lesson 3.2: Leveraging Remote Caching with Turborepo Cloud

Course Content

0% Complete0/16 Lessons

Lesson 1.1: Polyrepo vs. Monorepo - A Fundamental Choice

Lesson 1.2: The Advantages of a Monorepo

Lesson 1.3: The Challenges of a Monorepo

Quiz

Lesson 3.1: Configuring the `turbo.json` Pipeline in Detail

Lesson 3.2: Leveraging Remote Caching with Turborepo Cloud

Lesson 3.3: Advanced Filtering and Task Execution

Quiz

Course Content

0% Complete0/16 Lessons

Lesson 1.1: Polyrepo vs. Monorepo - A Fundamental Choice

Lesson 1.2: The Advantages of a Monorepo

Lesson 1.3: The Challenges of a Monorepo

Quiz

Lesson 3.1: Configuring the `turbo.json` Pipeline in Detail

Lesson 3.2: Leveraging Remote Caching with Turborepo Cloud

Lesson 3.3: Advanced Filtering and Task Execution

Quiz