minification.constantFolding

How to use the minification.constantFolding transformer.

Inline expressions that we can statically evaluate. ie.

Usage

require("babel").transform("code", { optional: ["minification.constantFolding"] });
$ babel --optional minification.constantFolding script.js

Example

In

var foo = 5 * 5;

Out

var foo = 25;