Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/brunch/terser-brunch

A javascript minifier for brunch files.
https://github.com/brunch/terser-brunch

Last synced: 9 days ago
JSON representation

A javascript minifier for brunch files.

Lists

README

        

# terser-brunch

Adds [Terser](https://github.com/terser-js/terser) support to [Brunch](https://brunch.io).

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](https://github.com/terser-js/terser#minify-options), use `config.plugins.terser` object, for example:

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

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

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

## License

The MIT License (MIT)