Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@webpack-blocks/uglify

andywer976MIT2.1.0TypeScript support: definitely-typed

Webpack block for UglifyJS

webpack, webpack-blocks, uglify, uglifyjs

readme

webpack-blocks - UglifyJS

Gitter chat NPM Version

This block provides UglifyJS webpack plugin configuration for webpack-blocks.

Based on uglifyjs-webpack-plugin (not webpack.optimize.UglifyJsPlugin) which uses UglifyJS v3 (uglify-es) that supports ECMAScript 2015.

This block will only work in the production mode.

Usage

const { createConfig, env, uglify } = require('webpack-blocks')

module.exports = createConfig([
  uglify(/* options */)
])

Options

You can pass any uglifyjs-webpack-plugin and UglifyJS options, see the uglifyjs-webpack-plugin docs for details.

Generated webpack config

By default generates this configuration:

{
  optimization: {
    minimizer: [
      new UglifyJSPlugin({
        parallel: true,
        cache: true,
        uglifyOptions: {
          compress: {
            warnings: false
          }
        }
      })
    ]
  }
}

webpack-blocks

Check out the

👉 Main documentation

Released under the terms of the MIT license.

changelog

@webpack-blocks/uglify - Changelog

2.0.0-alpha

  • Support for webpack 4 (#261)

1.1.0

  • Use uglifyjs-webpack-plugin v1.0 (not the beta) (#231)

1.0.0

Initial release.