@webpack-blocks/uglify
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/webpack-blocks__uglify package

2.1.0 • Public • Published

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.

Package Sidebar

Install

npm i @webpack-blocks/uglify

Weekly Downloads

277

Version

2.1.0

License

MIT

Unpacked Size

5.09 kB

Total Files

6

Last publish

Collaborators

  • andywer
  • webpack-blocks-andy