Registry / devops / rollup-plugin-cleaner

rollup-plugin-cleaner

JSON →
library1.0.0jsnpmunverified

A Rollup plugin that deletes specified directories before each build, ensuring clean output. Version 1.0.0 is the latest stable release; the package is minimal and rarely updated. It simplifies cleaning build artifacts compared to manually using `rimraf` or shell commands, with options for silent mode. Alternative plugins like rollup-plugin-delete offer similar functionality with more features.

npm install rollup-plugin-cleaner
INSTALL
IMPORT
SIG · ROLLUP-PLUGIN-CLEA
R
rollup-plugin-cleaner
devopsjavascriptv1.0.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18223 runs
build_error
glibc
node 18223 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

cleaner
import cleaner from 'rollup-plugin-cleaner'
const cleaner = require('rollup-plugin-cleaner')
Default ESM import; CommonJS require may work but not guaranteed.
cleaner
import { cleaner } from 'rollup-plugin-cleaner'
Named export is not available; only default export exists.

Configures rollup-plugin-cleaner to delete the ./build directory before each build.

// rollup.config.js import cleaner from 'rollup-plugin-cleaner'; export default { input: './src/index.js', output: { dir: './build', format: 'cjs', }, plugins: [ cleaner({ targets: ['./build/'], silent: true, }), ], };
Debug
Known issues
gotchaEnsure targets array contains absolute or relative paths; using '.' may delete unintended files.
fix
Specify explicit paths like './build/' instead of '.'.
affects: >=1.0.0
deprecatedPlugin is not actively maintained; may not support latest Rollup versions.
fix
Consider using rollup-plugin-delete as a maintained alternative.
affects: >=1.0.0
Errors
Common errors & fixes
TypeError: cleaner is not a function
Importing named export instead of default export
fix
Use import cleaner from 'rollup-plugin-cleaner'.
Error: Cannot find module 'rollup-plugin-cleaner'
Package not installed or not in node_modules
fix
Run npm install rollup-plugin-cleaner --save-dev.
Upgrade
Version history
1.0.0latest on npm
Audit
Dependencies
rolluprequiredpeer dependency required for plugin functionality
Agent activity
9 hits · last 30 days
node
8
Resources
rollup-plugin-cleaner — npm install rollup-plugin-cleaner · libregistry