Package Exports
- rollup-plugin-minify
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (rollup-plugin-minify) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
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