Skip to content
Simple rollup plugin for minifying code using babel-preset-minify.
Branch: master
Clone or download
Comandeer Merge pull request #158 from Comandeer/greenkeeper/husky-2.0.0
Update husky to the latest version 🚀

[ci skip]
Latest commit d9900c6 May 20, 2019


Build Status codecov Dependency Status devDependencies Status npm

Allows using babel-minify with Rollup.


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


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.

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; two plugins are loaded by default:


See LICENSE file for details.

You can’t perform that action at this time.