CLIActive

Rollup CLI

Command line interface for the Rollup JavaScript module bundler.

Open source page ↗

Field note

What it does

Rollup should typically be used from the command line. An optional Rollup configuration file simplifies command line usage and enables advanced functionality.

Capabilities

Available capabilities

Tags

Tags

Ways to use it

Ways to use it

npm

javascript / rollup

sdk

typescript / @rollup/plugin-typescript

npm

Not filed / Not filed

Product features

Product features

assert> ​

--bundleConfigAsCjs

Bundles the configuration file as CommonJS.

--bundleConfigAsCjs ​

Caveats when using native Node ES modules ​

Command line flags ​

Command Line Interface

Config Intellisense ​

--configPlugin <plugin>

Transpiles the config file to CommonJS using a Rollup plugin, e.g. for TypeScript configs.

--configImportAttributesKey <with

Configuration Files ​

Differences to the JavaScript API ​

--environment <values>

Passes environment values to the configuration.

--failAfterWarnings

Exits with an error after build if warnings occurred.

--filterLogs <filter>

Filters log messages.

Getting the current directory ​

Importing package.json ​

Loading a configuration from a Node package ​

--stdin=ext

Reads a file from stdin specifying the extension.

-w / --watch

Rebuilds bundles when source files change.

--watch.onStart / onBundleStart / onBundleEnd / onEnd / onError

Runs shell commands on watch lifecycle events.