function uglify(options = {}) {
  options = webpackMerge(
    {
      parallel: true,
      cache: true,
      uglifyOptions: {
        compress: {
          warnings: false
        }
      }
    },
    options
  )

  const postHook = (context, util) => {
    const plugin = new UglifyJSPlugin(options)
    return util.merge({
      optimization: {
        minimizer: [plugin]
      }
    })
  }

  return Object.assign(() => prevConfig => prevConfig, { post: postHook })
}
@param {object} [options] UglifyJS options
@return {Function}