1. @webpack-blocks/uglify
Webpack block for UglifyJS
@webpack-blocks/uglify
Package: @webpack-blocks/uglify
Created by: andywer
Last modified: Mon, 13 Jun 2022 01:37:37 GMT
Version: 2.1.0
License: MIT
Downloads: 1,253
Repository: https://github.com/andywer/webpack-blocks

Install

npm install @webpack-blocks/uglify
yarn add @webpack-blocks/uglify

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.

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code