src/configs/webpack/shared.js
function configureJsMinification(config) {
  if (!(minify || minifyJs))
    return
  config.optimization.minimize = true
  config.optimization.minimizer = [new UglifyJsPlugin({
    sourceMap: !disableSourceMaps,
    uglifyOptions: {
      output: {
        comments: false,
      },
    },
  })]
}
function configureJsMinification(config) {
  if (!(minify || minifyJs))
    return
  config.optimization.minimize = true
  config.optimization.minimizer = [new UglifyJsPlugin({
    sourceMap: !disableSourceMaps,
    uglifyOptions: {
      output: {
        comments: false,
      },
    },
  })]
}
function configureJsMinification ( config ) { if ( ! ( minify || minifyJs ) ) return config . optimization . minimize = true config . optimization . minimizer = [ new UglifyJsPlugin ( { sourceMap : ! disableSourceMaps , uglifyOptions : { output : { comments : false , } , } , } ) ] }
Configure the minifier to compress the final bundle.
Configure the minifier to compress the final bundle .