Flexible defaults for your monorepo tasks

Juri Strumpflohner
Published
Nx 23 and 23.1 made target defaults far more flexible. In this quick walkthrough I show how to override target defaults per project, inherit the global onChapters:
== Links ==
== Chapters ==
- 00:00 - Intro
- 00:27 - What are target defaults
- 01:06 - Overriding per project (Nx 23)
- 01:47 - How Nx resolves defaults
- 02:25 - Inheriting with the spread operator
- 02:51 - Filtering properties (Nx 23.1)
- 03:42 - Plugin, project & tag filters
- 04:36 - Running it across the workspace
- 05:24 - Wrap-upes with the spread operator instead of replacing them, and use the new array + filter syntax (23.1) to apply defaults to specific plugins, projects, or tags. In a monorepo this saves you from repeating the same config across hundreds of projects.