With the latest update to Version 15.3, Nx undergoes a remarkable transformation: it now supports the development of standalone projects. This expansion allows us to maintain modularity in code, much like an Nx monorepo, but within a single, independent project, without having to forego the proven features of Nx.
The structure of a standalone project significantly differs from the conventional
libs directories we are familiar with from working with Nx monorepos. In such a case, the application sits directly in the root directory of the workspace. Libraries can be added to modularize the application. This innovation allows libraries to be placed immediately in direct proximity to the application.
Here is an example of the directory structure:
Nx enriches our development practice with a range of generators, useful features such as module boundary rules, and the ability to manage tests, linting, and builds for individual libraries. We must not overlook the sophisticated Nx caching system, which further facilitates our work.
In summary, Nx is a powerful tool that offers significant benefits to frontend developers.