JSPM

rollup-plugin-minify

1.0.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 155
  • Score
    100M100P100Q83416F
  • License MIT

Rollup plugin to minify generated format into new minified file, with source maps, using uglify-js.

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.

CircleCI

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