Nx - The fastest growing monorepo solution in the JS ecosystem
Tags: monorepo, nx, javascript, webdev
Published: 2022-06-29 14:29:00

---
title: Nx - The fastest growing monorepo solution in the JS ecosystem
published: true
description: 
tags:
  - monorepo
  - nx
  - javascript
  - webdev
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fnz2knrjw6ncdi40wkpc.png
# Use a ratio of 100:42 for best results.
---

**EDIT(Sep 9th, 2022):** approaching 2.5 million

---

[Nx](https://nx.dev) just crossed 2 million NPM downloads / week ([see @nrwl/tao package on npm](https://www.npmjs.com/package/@nrwl/tao)).

{% twitter https://twitter.com/victorsavkin/status/1541781192114143232?s=20&t=oKOk8ddQNKUpuWMGV7B7cg %}

And these are just the public downloads which do not include all the big fortune 500 companies using Nx on a daily basis to power their teams.

But it is not just about the number of downloads, but about the growth: Nx crossed **1 million per week in January 2022** and now **2 million in June 2022**.

![Nx growth](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7r8c8cws3cmnju1ztpvq.png)

At this point you might now be wondering: what is Nx and what are monorepos? Let's start with monorepos first.

## What is a monorepo?

The term "monorepo" is kind of misleading, but in principle it is a single (usually) Git repository hosting multiple projects. Those projects ideally form relationships among them by sharing and re-using functionality. 

![Monorepo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1nzs89u4kit4jbcwc09u.png)

The advantage for developers? If done right, increased productivity by being able to directly use shared dependencies rather than going through versioning & publishing to internal registries, being able to easily run cross-cutting experiments, do a refactoring with a single PR rather than coordinating multiple releases & version updates, more visibility to other projects & greater developer mobility among teams. These are just some of the benefits.

The exact setup of a monorepo comes in different shapes, from using a single-version policy approach to colocating packages with their own `node_modules` folders and applying symlinks for sharing code.

You can learn more at [https://monorepo.tools](https://monorepo.tools).

## What is Nx?

The official slogan: "a smart, fast and extensible build system". Does that mean it is a replacement for Webpack, Vite, SWC or Vite? Not really! At its core Nx is rather an orchestrator that applies these tools in the most efficient way.

Monorepo support is built into Nx's DNA. You can use Nx..

**Light-weight and incrementally** by leveraging it's powerful task scheduler. This is especially interesting if you already have a yarn/npm/pnpm workspace based monorepo setup and you want to enhance its capabilities. If you happen to use [Lerna](https://lerna.js.org) you might want to [read this](https://blog.nrwl.io/lerna-5-1-new-website-new-guides-new-lerna-example-repo-distributed-caching-support-and-speed-64d66410bec7?source=friends_link&sk=fc349af13ce1935a7ca149b4f3c123c3).

Here's an example for showing the lightweight setup of Nx, by incrementally adding it to an existing Yarn workspaces monorepo:

{% youtube https://youtu.be/hCm373Aq1uQ %}


**Using its plugin system** which comes with powerful support for Angular, React, Next, Next.js, Node and more. These plugins are more opinionated, but carefully crafted to provide the best possible developer experience and remove the burden of a manual tooling setup. Furthermore it comes with advanced features such as [automated module federation setup](https://nx.dev/module-federation/faster-builds) or [automated code migrations](https://egghead.io/lessons/javascript-update-your-nx-workspace-with-nx-migrations), a feature that is highly appreciated by large enterprises which otherwise struggle to keep their tooling up to date.

Here's an example of developing a React application using Nx's powerful plugin system:
{% youtube https://youtu.be/QghilgRe-pw %}

Learn more at [nx.dev](https://nx.dev) and on [Youtube](https://www.youtube.com/nrwl_io). You might also find this [free Egghead course interesting](https://egghead.io/courses/scale-react-development-with-nx-4038).

## How does Nx compare to other monorepo tools in the space?

- Nx offers the full spectrum, allowing for an incremental and lightweight adoption to providing a more complete and preconfigured experience based on plugins. It does not just help setup a monorepo and execute tasks, but also guides developers throughout the development lifecycle.
- Nx is faster than most of the current available alternatives. [See the corresponding benchmark repository](https://github.com/vsavkin/large-monorepo)
- Nx provides the ability to distribute the execution of tasks efficiently across multiple machines, known as [Distributed Task Execution (DTE)](https://nx.dev/using-nx/dte). This is possible via [Nx Cloud](https://nx.app) and provides major performance improvements on CI.
- Nx has a particular focus on the developer experience. A dedicated [VSCode extension](https://twitter.com/NxDevTools/status/1518620884570820608) and a [beautiful terminal output](https://twitter.com/NxDevTools/status/1520085544008503298?s=20&t=usL2N8wOxuYoqBAZ7ih7ug) are just two examples for that.
- Nx is extensible, coming with its own [devkit](https://nx.dev/extending-nx/nx-devkit) which allows to fully customize and tailor the Nx experience to your own needs.

## Nx Community

There's a large community behind Nx which can be found at https://nx.dev/community.

---

## Learn more

🧠 [Nx Docs](https://nx.dev)
👩‍💻 [Nx GitHub](https://github.com/nrwl/nx)
💬 [Nrwl Community Slack](https://go.nrwl.io/join-slack)
📹 [Nrwl Youtube Channel](https://www.youtube.com/nrwl_io)
🥚 [Free Egghead course](https://egghead.io/courses/scale-react-development-with-nx-4038)
🧐 [Need help with Angular, React, Monorepos, Lerna or Nx? Talk to us 😃](https://nrwl.io/contact-us)
🛠 [monorepo.tools](https://monorepo.tools)

Also, if you liked this, click the :heart: and make sure to follow [Juri](https://twitter.com/juristr) and [Nx](https://twitter.com/nxdevtools) on Twitter for more!

{% embed https://dev.to/t/nx %}

Some of the latest announcements:

- [Nrwl, Nx and Lerna joining forces](https://dev.to/nrwl/lerna-is-dead-long-live-lerna-3jal)
- [Lerna 5.1 - New website, new guides, new Lerna example repo, distributed caching support and speed!](https://dev.to/nrwl/lerna-51-new-website-new-guides-new-lerna-example-repo-distributed-caching-support-and-speed-31oe)