rollup-plugin-minify
v1.0.3
Published
Rollup plugin to minify generated format into new minified file, with source maps, using uglify-js.
Downloads
973
Maintainers
Readme
rollup-plugin-minify
Rollup plugin to minify generated format into new minified file, with source maps, using uglify-js.
Install
npm install rollup-plugin-minify
Usage
import { rollup } from 'rollup'
import minify from 'rollup-plugin-minify'
rollup({
entry: 'src.js',
plugins: [
minify({iife: 'iife.min.js', cjs: 'cjs.min.js'})
]
})
This will generate minified "iife.min.js"
file with iife
format, so and cjs
.
You can pass uglify-js options, as below:
plugins: [
minify({ iife: {
dest: 'iife.min.js',
mangle: false,
sourceMapUrl: 'localhost/out.js.map'
}})
]
License
MIT