Webpack block for UglifyJS
npm install @webpack-blocks/uglify

This block provides UglifyJS webpack plugin configuration for
webpack-blocks.
Based on uglifyjs-webpack-plugin (notwebpack.optimize.UglifyJsPlugin) which uses UglifyJS v3 (uglify-es) that supports ECMAScript 2015.
This block will only work in the production mode.
``js
const { createConfig, env, uglify } = require('webpack-blocks')
module.exports = createConfig([
uglify(/ options /)
])
`
You can pass any uglifyjs-webpack-plugin and UglifyJS options, see theuglifyjs-webpack-plugin docs for details.
By default generates this configuration:
`js``
{
optimization: {
minimizer: [
new UglifyJSPlugin({
parallel: true,
cache: true,
uglifyOptions: {
compress: {
warnings: false
}
}
})
]
}
}
Check out the
š Main documentation
Released under the terms of the MIT license.