# rollup-plugin-babel-minify

> Simple rollup plugin for minifying code using babel-minify.

Latest version **10.0.0** (published 2020-03-14) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install rollup-plugin-babel-minify
pnpm add rollup-plugin-babel-minify
yarn add rollup-plugin-babel-minify
bun add rollup-plugin-babel-minify
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 10.0.0 |
| Published | 2020-03-14 |
| First published | 2017-08-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=10.13.0 |
| Dependencies | 5 |
| Unpacked size | 36 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 48 |
| Author | Comandeer |
| Maintainers | boopathi, comandeer |
| Keywords | rollup, rollup-plugin, babili, minify |

## Links

- npm: https://www.npmjs.com/package/rollup-plugin-babel-minify
- Repository: https://github.com/Comandeer/rollup-plugin-babel-minify
- Homepage: https://github.com/Comandeer/rollup-plugin-babel-minify#readme
- Issues: https://github.com/Comandeer/rollup-plugin-babel-minify/issues
- npm.io page: https://npm.io/package/rollup-plugin-babel-minify

## Dependencies (5)

- [@babel/core](https://npm.io/package/@babel/core.md) ^7.8.7
- [sourcemap-codec](https://npm.io/package/sourcemap-codec.md) ^1.4.8
- [babel-preset-minify](https://npm.io/package/babel-preset-minify.md) ^0.5.1
- [@comandeer/babel-plugin-banner](https://npm.io/package/@comandeer/babel-plugin-banner.md) ^5.0.0
- [@babel/plugin-syntax-dynamic-import](https://npm.io/package/@babel/plugin-syntax-dynamic-import.md) ^7.8.3

## 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

- 10.0.0 (latest) — 2020-03-14
- 9.1.1 — 2019-11-10
- 9.1.0 — 2019-09-19
- 9.0.0 — 2019-06-29
- 8.0.0 — 2019-03-08
- 7.0.0 — 2019-01-17
- 6.2.0 — 2018-11-22
- 6.1.1 — 2018-10-07
- 6.1.0 — 2018-10-02
- 6.0.0 — 2018-08-28
- 5.0.0 — 2018-05-20
- 4.0.0 — 2018-02-03
- 3.1.2 — 2017-08-14
- 0.0.0 — 2017-08-11

## README

# rollup-plugin-babel-minify

[![Build Status](https://github.com/Comandeer/rollup-plugin-babel-minify/workflows/CI/badge.svg)](https://github.com/Comandeer/rollup-plugin-babel-minify/actions) [![codecov](https://codecov.io/gh/Comandeer/rollup-plugin-babel-minify/branch/master/graph/badge.svg)](https://codecov.io/gh/Comandeer/rollup-plugin-babel-minify) [![Dependency Status](https://david-dm.org/Comandeer/rollup-plugin-babel-minify.svg)](https://david-dm.org/Comandeer/rollup-plugin-babel-minify) [![devDependencies Status](https://david-dm.org/Comandeer/rollup-plugin-babel-minify/dev-status.svg)](https://david-dm.org/Comandeer/rollup-plugin-babel-minify?type=dev) [![npm](https://img.shields.io/npm/v/rollup-plugin-babel-minify.svg)](https://www.npmjs.com/package/rollup-plugin-babel-minify)

Allows using [babel-minify](https://github.com/babel/minify) with [Rollup](https://rollupjs.org/guide/en).

## ☠️ Project is deprecated! ☠️

Version 10.0.0, released on 2020-03-14, will be the last version of the project, as [`babel-minify` is basically dead](https://github.com/babel/minify/issues/952). Please consider using [`rollup-plugin-terser`](https://www.npmjs.com/package/rollup-plugin-terser) instead.

## Installation

```bash
npm install rollup-plugin-babel-minify [--save-dev]
```

## Usage

```javascript
import { rollup } from 'rollup';
import minify from 'rollup-plugin-babel-minify';

rollup( {
	input: './src/index.js',
	plugins: [
		minify( {
			// Options for babel-minify.
		} )
	]
} );
```

For the list of options, check [babel-minify preset's docs](https://github.com/babel/minify/blob/master/packages/babel-preset-minify/README.md#options).

There are additional options:

* `comments` (default: `true`): indicates if comments should be preserved in source;
* `banner` (default: `undefined`): the comment which should be prepended to the transformed bundle;
* `bannerNewLine` (since 4.0.0, default: `false`): indicates if the banner comment should be followed by a new line;
* `sourceMap` (default: `true`): indicates if sourcemap should be generated;
* `plugins` (since 6.2.0): indicates which Babel plugins should be loaded alongside [minify preset](https://github.com/babel/minify/tree/master/packages/babel-preset-minify); two plugins are loaded by default:
	* [`@comandeer/babel-plugin-banner`](https://www.npmjs.com/package/@comandeer/babel-plugin-banner),
	* [`@babel/plugin-syntax-dynamic-import`](https://www.npmjs.com/package/@babel/plugin-syntax-dynamic-import) (since 7.0.0).

Check [API docs](https://comandeer.github.io/rollup-plugin-babel-minify) for more detailed description.

## License

See [LICENSE](./LICENSE) file for details.

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