# rollup-plugin-del

> rollup plugin: delete package dist

Latest version **1.0.1** (published 2022-03-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install rollup-plugin-del
pnpm add rollup-plugin-del
yarn add rollup-plugin-del
bun add rollup-plugin-del
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2022-03-17 |
| First published | 2022-03-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 6.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | lihh |
| Maintainers | lihh |
| Keywords | rollup, plugin, del, dist |

## Links

- npm: https://www.npmjs.com/package/rollup-plugin-del
- Repository: https://github.com/a572251465/rollup-plugin-del
- Issues: https://github.com/a572251465/rollup-plugin-del/issues
- npm.io page: https://npm.io/package/rollup-plugin-del

## Dependencies (2)

- [glob](https://npm.io/package/glob.md) ^7.2.0
- [fs-extra](https://npm.io/package/fs-extra.md) ^10.0.1

## Alternatives

- [raw-loader](https://npm.io/package/raw-loader.md) — 4.3M weekly downloads
- [plop](https://npm.io/package/plop.md) — 1.4M weekly downloads
- [webpack-deadcode-plugin](https://npm.io/package/webpack-deadcode-plugin.md) — 80.3K weekly downloads
- [@storybook/preact-vite](https://npm.io/package/@storybook/preact-vite.md) — 54.2K weekly downloads
- [vite-plugin-transform](https://npm.io/package/vite-plugin-transform.md) — 2.4K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2022-03-17
- 1.0.0 — 2022-03-17

## README

## rollup-plugin-del
> rollup plugin && You can delete packaged directories and customize deletion rules

### install
> $ npm install rollup-plugin-del -D <br/>
> $ yarn add rollup-plugin-del -D <br />
> $ pnpm install rollup-plugin-del -D

### options
- dest
  - default is empty. when not specified. will use output dir/ file. Priority is dir > file
  - if then value exists. This value is preferred
  - It can be a fixed path or a matching path satisfying `glob`
  - example
    - path.resolve(__dirname, "./dist/\*\*/*.js") OR
    - path.resolve(__dirname, "dist")

### use
```javascript
import del from 'rollup-plugin-del'
export default defineConfig({
  input: resolvePath('../src/index.ts'),
  plugins: [
    del(),
//  del({dest: path.resolve(__dirname, "dist/**/*.js")})
    ts(),
    babel({
      babelHelpers: 'bundled'
    }),
    nodeResolve(),
    commonjs(),
    terser()
  ],
  output: [
    {
      file: resolvePath('../dist/index.esm.js'),
      format: 'esm'
    }
  ]
})
```

---
_Source: https://npm.io/package/rollup-plugin-del · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
