2.3.1 • Published 9 years ago

uglify-loader-temporary v2.3.1

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

uglify-loader

Uglify loader for webpack

npm install uglify-loader --save-dev

Use Case

Webpack has UglifyJSPlugin that uglifies the output after bundling. In the applications that depend on thirdparty libraries you may want to uglify with mangling only your application code but not the code that you don't control. You can pass UglifyJS parameters via query property.

Example

module: {
    loaders: [
        {
            // I want to uglify with mangling only app files, not thirdparty libs
            test: /.*\/app\/.*\.js$/,
            exclude: /.spec.js/, // excluding .spec files
            loader: "uglify",
            query: {
                mangle: false
            }
        }
    ]
}