@nx/rolldown - Generators
The @nx/rolldown plugin provides various generators to help you create and configure rolldown projects within your Nx workspace. Below is a complete reference for all available generators and their options.
For an overview of the plugin and setup instructions, see the @nx/rolldown introduction.
configuration
Section titled “configuration”Add Rolldown Configuration to a project.
Usage:
nx generate @nx/rolldown:configuration [options]Arguments:
nx generate @nx/rolldown:configuration <project> [options]Options
Section titled “Options”| Option | Type | Description | Default |
|---|---|---|---|
--externalDependencies | boolean | Leave dependencies from package.json out of the bundle so they load from node_modules at runtime. Defaults to true for the node platform. | |
--format | string | The output module format. | "esm" |
--main | string | Path relative to the workspace root for the entry file. Defaults to <projectRoot>/src/main.ts if it exists, otherwise <projectRoot>/src/index.ts. | |
--outputPath | string | Path relative to the workspace root for the output directory. Defaults to <projectRoot>/dist in TypeScript solution workspaces, otherwise dist/<projectRoot>. | |
--platform | string | The platform to bundle for. | "node" |
--skipFormat | boolean | Skip formatting files. | false |
--skipPackageJson | boolean | Do not add dependencies to package.json. | false |
--tsConfig | string | Path relative to the workspace root for the tsconfig file used to resolve TypeScript options. Defaults to <projectRoot>/tsconfig.app.json or <projectRoot>/tsconfig.lib.json, whichever exists. |
Getting Help
Section titled “Getting Help”You can get help for any generator by adding the --help flag:
nx generate @nx/rolldown:<generator> --help