Skip to content
This repository has been archived by the owner on Feb 9, 2023. It is now read-only.
/ terser-brunch Public archive

A javascript minifier for brunch files.

License

Notifications You must be signed in to change notification settings

brunch/terser-brunch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

terser-brunch

Adds Terser support to Brunch.

The plugin will minify your JavaScript files. Supports modern language features.

Previously known as uglify-js-brunch.

Usage

Install the plugin via npm with npm install --save-dev terser-brunch.

To specify Terser options, use config.plugins.terser object, for example:

module.exports = {
  // ...
  plugins: {
    terser: {
      mangle: false,
      compress: {
        global_defs: {
          DEBUG: false,
        },
      },
    },
  },
};

Joined files can be ignored and be passed-through, using ignored option:

module.exports = {
  plugins: {
    terser: {
      ignored: /dont-minimize\.js/,
    },
  },
};

License

The MIT License (MIT)