{"library":"rollup-plugin-cleandir","title":"rollup-plugin-cleandir","description":"A Rollup plugin that automatically empties output directories before each build. Version 3.0.0 requires Rollup >=4.0.0 and runs on the `buildStart` hook with `order: 'pre'` by default, ensuring cleanup happens before any other plugin. The plugin forces an explicit `OUT_DIR` argument (optional in v2 but required in v3). It ships TypeScript definitions. Compared to similar plugins like `rollup-plugin-clean`, it is minimal and focused, with no extra features. Release cadence is low; major versions align with Rollup major upgrades.","language":"javascript","status":"active","last_verified":"Mon Apr 27","install":{"commands":["npm install rollup-plugin-cleandir"],"cli":null},"imports":["import { cleandir } from 'rollup-plugin-cleandir'","const { cleandir } = require('rollup-plugin-cleandir')","import type { CleandirOptions } from 'rollup-plugin-cleandir'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"// rollup.config.js\nimport { cleandir } from 'rollup-plugin-cleandir';\n\nexport default {\n  input: 'src/index.js',\n  output: {\n    dir: 'dist',\n    format: 'es',\n  },\n  plugins: [cleandir('dist')],\n};","lang":"javascript","description":"Shows basic usage: import the named export and pass the output directory as the first argument.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}