nx
Nx is a powerful build system with first-class monorepo support and powerful integrations that provides smart, fast, and extensible build infrastructure for any…
Installation
npm install -D nx
yarn add -D nx
pnpm add -D nx
Import
// nx.json configuration
Quick Example
// nx.json
{
"targetDefaults": {
"build": {
"dependsOn": ["^build"],
"cache": true
},
"test": {
"cache": true
}
}
}About nx
Nx is a powerful build system with first-class monorepo support and powerful integrations that provides smart, fast, and extensible build infrastructure for any codebase. Nx offers computation caching (local and remote), distributed task execution across multiple machines, affected commands that only run tasks for changed projects, code generators for scaffolding new projects and components, and a visual dependency graph for understanding project relationships. Unlike Turborepo which focuses on task orchestration, Nx provides a complete development platform with plugins for React, Angular, Vue, Node.js, Next.js, Nest, and many other frameworks that include generators, executors, and migration utilities. The affected command analyzes git changes against the project dependency graph to determine which projects need rebuilding, testing, or linting, significantly reducing CI time for large monorepos. Nx Cloud provides remote caching and distributed task execution across CI agents, achieving near-linear scaling of build times as the codebase grows. Nx can be adopted incrementally — it works with existing projects as a task runner and can be extended with plugins for deeper integration.
Quick Facts
| Package | nx |
| Category | Build Tool |
| Weekly Downloads | 4M+ |
| License | MIT |
| Install | npm install -D nx |
Related Packages
Turborepo is a high-performance build system for JavaScript and TypeScript monorepos that provides i…
Lerna is the original JavaScript monorepo management tool, providing utilities for managing multi-pa…
Changesets is a tool for managing versioning and changelogs in multi-package repositories, focusing …
TypeScript is a strongly typed programming language that builds on JavaScript, adding static type de…
Vite is a next-generation frontend build tool created by Evan You (creator of Vue.js) that provides …
Browse npm Packages by Category
Explore our reference of 200 popular npm packages with install commands, examples, and quick-start guides.