Nx Monorepo Solution
repository·master·Indexed 12 days ago
https://github.com/nrwl/nxA high-performance monorepo solution for TypeScript and polyglot codebases. Nx optimizes development workflows through intelligent caching, affected-only task execution, and an extensible plugin system.
What's inside Nx
- The Oxlint plugin for Nx allows you to integrate Oxlint—a high-performance JavaScript/TypeScript linter—into your Nx monorepo workflow. It is designed to optimize linting tasks, helping to speed up CI processes and developer feedback loops by leveraging Oxlint's speed within the Nx task execution graph.
Overview of the Nx Cypress plugin
masterThe@nx/cypresspackage is a Cypress plugin for Nx that integrates Cypress end-to-end testing into an Nx monorepo. It allows you to run Cypress tests efficiently by leveraging Nx's computation caching and dependency graph, ensuring that only affected tests are run when code changes.Use the EsBuild plugin for Nx
masterThis package provides an EsBuild plugin designed to work with Nx. It allows you to integrate EsBuild into your Nx-managed workspace to leverage its fast bundling capabilities while maintaining Nx's smart monorepo features like computation caching and dependency graphing.Use the Nx Angular plugin
masterThe@nx/angularpackage is an Angular plugin for Nx. It provides specialized tooling to manage Angular applications and libraries within an Nx monorepo, enabling optimized builds, scalable CI, and improved developer workflows. This plugin integrates Angular-specific tasks (like building, testing, and linting) into the Nx computation cache and dependency graph.Use @nx/angular:dev-server for Angular development
masterThe
@nx/angular:dev-serverexecutor is a drop-in replacement for the@angular-devkit/build-angular:dev-serverbuilder. It supports standard Angular CLI features plus:- Vite-based serving: Automatically used when building with
@nx/angular:applicationor@nx/angular:browser-esbuild. - Webpack-based serving: Used when building with
@nx/angular:webpack-browser. - HTTP Middleware: Support for custom middleware when using esbuild-based executors via the
esbuildMiddlewareoption. - Incremental builds.
- Vite-based serving: Automatically used when building with
Use the nx-win32-arm64-msvc binary
masterThenx-win32-arm64-msvcpackage provides the aarch64-pc-windows-msvc binary specifically for@nx/nx. This package is intended for users running Nx on Windows machines with ARM64 architecture using the MSVC toolchain.Understand @nx/dotnet E2E test coverage
masterThe
@nx/dotnetE2E tests verify several critical plugin capabilities across two main test suites:Basic Functionality (
dotnet.test.ts)- Project Detection: Ensures .NET projects are correctly identified by the plugin.
- Target Configuration: Validates that standard targets (
build,test,clean,restore,publish,pack) are generated based on project types. - Build Operations: Verifies building console applications, class libraries, and executing tests.
- Project Graph: Confirms that dependencies between .NET projects are correctly detected in the Nx graph.
Multi-Project Scenarios (
dotnet-multi-project.test.ts)- Multiple Projects in Same Directory: Tests the plugin's ability to handle multiple .NET projects within a single Nx project.
- Complex Dependency Chains: Validates project references and ensures correct build ordering.
- Framework Variations: Tests support for projects targeting different .NET frameworks.
Use the Nx React Native plugin
masterNx provides a React Native plugin that integrates React Native projects into an Nx monorepo. This allows you to leverage Nx features like computation caching, affected commands, and dependency graphing for your React Native applications.
Note: This file is a template. When used in a real project,
{{links}}and{{content}}will be replaced with specific installation instructions and usage guides for the React Native plugin.Use the experimental @nx/gradle plugin
masterThe
@nx/gradleplugin allows you to integrate Gradle projects into an Nx monorepo.Warning: This plugin is currently experimental. Features and APIs are subject to change and may not be stable for production use.
Identify the `nx-linux-x64-musl` binary
masterThenx-linux-x64-muslpackage provides the x86_64-unknown-linux-musl compiled binary for@nx/nx. This version is specifically intended for Linux environments using themuslC standard library, such as Alpine Linux or other lightweight container environments.What is the Nx Vite plugin?
masterThe Nx Vite plugin is a specialized integration that allows Nx to work seamlessly with Vite-based projects. It enables Nx to leverage its smart monorepo capabilities—such as computation caching and affected analysis—specifically for projects using the Vite build tool and development server.What is the Nx Module Federation plugin?
masterThe Nx Module Federation plugin is a tool designed to implement Module Federation within an Nx workspace. Module Federation enables developers to share code between deployed applications more easily, facilitating efficient team collaboration and micro-frontend architectures. This plugin integrates Module Federation capabilities directly into the Nx ecosystem, allowing for optimized builds and scaled CI processes.