@nrwl/rollup:rollup-project

Add Rollup Configuration to a project.

Usage

nx generate rollup-project ...

By default, Nx will search for rollup-project in the default collection provisioned in workspace.json.

You can specify the collection explicitly as follows:

nx g @nrwl/rollup:rollup-project ...

Show what will be generated without writing to disk:

nx g rollup-project ... --dry-run

Options

compiler

string
Default: babel
Accepted values: babel, swc, tsc

The compiler to use to build source.

external

Array<string>

A list of external modules that will not be bundled (react, react-dom, etc.).

importPath

string

The library name used to import it, like @myorg/my-awesome-lib.

main

entryFile
string

Path relative to the workspace root for the main entry file. Defaults to '<projectRoot>/src/main.ts'.

project

string

The name of the project.

rollupConfig

string

Path relative to workspace root to a custom rollup file that takes a config object and returns an updated config.

skipFormat

boolean
Default: false

Skip formatting files.

skipPackageJson

boolean
Default: false

Do not add dependencies to package.json.

tsConfig

string

Path relative to the workspace root for the tsconfig file to build with. Defaults to '<projectRoot>/tsconfig.app.json'.