Nx plugins package knowledge about a tool or framework so every project doesn't need to recreate the same integration. A plugin can contribute project graph data, inferred tasks, generators, migrations, and executors.
For example, plugins can:
- Configure Nx cache settings for a tool. The
@nx/viteplugin can automatically configure the inputs and outputs for abuildtask based on the settings in thevite.config.tsfile it uses. - Update tooling configuration when upgrading the tool version. When Storybook 7 introduced a new format for their configuration files, anyone using the
@nx/storybookplugin could automatically apply those changes to their repository when upgrading. - Set up a tool for the first time. With the
@nx/playwrightplugin installed, you can use the@nx/playwright:configurationcode generator to set up Playwright tests in an existing project. - Run a tool in an advanced way. The
@nx/jsplugin's@nx/js:tscexecutor combines the Nx understanding of your repository with Typescript's native batch mode feature to make your builds even more performant.
Plugin features
Section titled “Plugin features” Infer tasks Automatically configure Nx settings for tasks based on tooling configuration
Generate Code Generate and modify code to set up and use the tool or framework
Maintain Dependencies Automatically update package versions and tooling configuration
Enhance Tooling with Executors Run a tool in an advanced way that may not be possible from the command line
Find or build a plugin
Section titled “Find or build a plugin”Nx maintains plugins for frameworks and tools across frontend, backend, testing, and build ecosystems. Community plugins extend that ecosystem with additional technologies.
Plugin registry Browse official and community plugins
Build a plugin Create a plugin for your organization or the community