Rollup plugin to minify generated bundle.
npm i rollup-plugin-uglify -D
options – default:
object. UglifyJS API options
minifier – default:
function. Module to use as a minifier. You can use other versions (or forks) of UglifyJS instead default one.
If you'd like to preserve comments (for licensing for example), then you can specify a function to do this like so:
Alternatively, you can also choose to keep all comments (e.g. if a licensing header has already been prepended by a previous rollup plugin):
See UglifyJS documentation for further reference.
MIT © Bogdan Chadkin