The Nx Plugin for Rollup contains executors and generators that support building applications using Rollup.
Setting Up @nx/rollup
Section titled “Setting Up @nx/rollup”Installation
Section titled “Installation”In any Nx workspace, you can install @nx/rollup
by running the following command:
nx add @nx/rollup
This will install the correct version of @nx/rollup
.
Using @nx/rollup
Section titled “Using @nx/rollup”Generate a new project using Rollup
Section titled “Generate a new project using Rollup”You can generate a new library that uses Rollup with the following command:
nx g @nx/js:lib mylib --bundler=rollup
This will create a new library configured to use Rollup for building.