0.1.1 • Published 6 years ago

@yuloh/rollup-plugin-uglify v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
6 years ago

rollup-plugin-uglify

A rollup plugin to minify javascript with UglifyJS 3. No other dependencies.

Installation

npm install --save-dev @yuloh/rollup-plugin-uglify

Usage

Any options are passed directly to uglify. You can view the possible options in the Uglify docs. Unless explicitly disabled the sourceMap and warnings options are enabled so they can be passed to Rollup.

import uglify from '@yuloh/rollup-plugin-uglify';

export default {
  input: 'src/index.js',
  output: [
    {
      format: 'iife',
      file: 'dist/bundle.js'
    }
  ],
  plugins: [
    uglify()
  ]
};

Contributing

Contributions are welcome. This project aims to provide a minimal wrapper for Uglify so it can be used with Rollup. Any features that aren't provided by Uglify itself will likely be rejected. You can lint and test your code with the commands npm run lint and npm test.