uglify-js-plugin

Uglify JavaScript for webpack

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
uglify-js-plugin
0.0.66 years ago6 years agoMinified + gzip package size for uglify-js-plugin in KB

Readme

uglify-js-plugin
Uglify JavaScript for webpack

Install

$ npm install uglify-js-plugin --save-dev

Usage

//webpack.config.js
var UglifyJsPlugin = require('uglify-js-plugin');

module.exports = {
    entry: {
        hello: './src/hello.js'
    },
    output: {
        path: './build',
        filename: '[name].js'
    },
    plugins: [
        new UglifyJsPlugin({
            compress: true, //default 'true', you can pass 'false' to disable this plugin
            debug: true //default 'false', it will display some information in console
        })
    ]
};