
babel/minify
Releases394
Frequency5 days 7 hours
Last Release
Stars4.38K
:scissors: An ES6+ aware minifier based on the Babel toolchain (beta)
Linked projects
Babel preset for all minify plugins.
Inline the `NODE_ENV` environment variable and evaluate it if possible
✂️ An ES6+ aware minifier based on the Babel toolchain (beta)
Inline environment variables.
Inlines bindings when possible. Tries to evaluate expressions and prunes unreachable as a result.
Replace references to `undefined` with `void 0`
Turn valid member expression property literals into plain identifiers
Turn boolean literals into !0 for true and !1 for false.
Turn valid property key literals to plain identifiers
Remove debugger statements
Minify Standard built-in Objects
Tries to evaluate expressions and inline the result.
Shortens numeric literals using scientific notation
This removes rvals that are equivalent to undefined wherever possible
Convert === and !== to == and != if their types are inferred to be the same.
Context- and scope- aware variable renaming.
**Note:** Not recommended if full support for IE8 and lower is required. [Details](https://github.com/babel/minify/pull/45#discussion_r70181249)
This plugin inlines consecutive property assignments, array pushes, etc.
Merge sibling variables into one.
**Note:** while this plugin doesn’t shorten the output in any way, it does optimize it for repetition-based compression algorithms such as gzip.
> Simplifies code for minification by reducing statements into expressions and making expressions uniform where possible.
Remove all console.* calls.
## Example
Configurable "search and replace" plugin. Replaces matching nodes in the tree with a given replacement node. For example you can replace `process.NODE_ENV` with `"production"`.
This changes RegExp constructors into literals if the RegExp arguments are strings.
Mark scopes for deopt which contain a direct eval call
## Installation
path.evaluate wrapped in a try catch
## Installation
## Installation
## Installation
Babel Minify plugin for Gulp
* Fork from <https://github.com/babel/minify/tree/0.3.x/packages/babel-plugin-minify-dead-code-elimination> * Fix issue <https://github.com/babel/babel/issues/11343>