@yuloh/rollup-plugin-uglify
v0.1.1
Published
A simple plugin for using UglifyJS with Rollup
Readme
rollup-plugin-uglify
A rollup plugin to minify javascript with UglifyJS 3. No other dependencies.
Installation
npm install --save-dev @yuloh/rollup-plugin-uglifyUsage
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.
