Tasks & Caching
A series of recipes that show how to run tasks efficiently with Nx
Configure Inputs for Task Caching
Learn how to optimize when Nx restores from the cache by customizing what should be taken into consideration when calculating computation hashes for tasks
Configure Outputs for Task Caching
Learn how to optimize what Nx restores from the cache
Define a Task Pipeline
This recipe shows how to define task dependencies in your Nx workspace
Use the Terminal UI
Learn how to leverage and configure the Nx Terminal UI when running tasks
Run Custom Commands
Learn how to run custom terminal commands with Nx to make them cacheable, distributable, and compatible with Nx's affected commands.
Pass Args to Commands
Recipe describing how to pass args to tasks running commands
Run Tasks in Parallel
Learn how to configure Nx to run multiple tasks simultaneously by adjusting the parallel option in the command line or nx.json configuration.
Run Root-Level NPM Scripts with Nx
Learn how to run npm scripts from your root package.json using Nx to benefit from caching, task orchestration, and other Nx features.
Workspace Watching
Learn how to use Nx's workspace watching feature to automatically execute commands when files change, improving development workflow and productivity.
Reduce Repetitive Configuration
Learn how to use Nx's targetDefaults, namedInputs, and other features to minimize duplicate configuration across projects in your workspace.
Change Cache Location
Learn how to customize where Nx stores its cache files by modifying the cacheDirectory setting in your nx.json configuration.
Skip Task Caching
Learn how to bypass Nx's caching mechanism for specific tasks, skip remote caching from Nx Cloud, and reset the cache when needed.
Migrate to Inferred Tasks (Project Crystal)
Learn how to convert your Nx workspace from explicit executor configuration to using inferred tasks for reduced configuration and improved caching.
Self-Host the Remote Cache
Learn how to self-host Nx remote caching on AWS S3, Google Cloud, Azure, or shared drives, or build your own cache server for enhanced build performance in your monorepo.