How to use the minification.constantFolding transformer.
Inline expressions that we can statically evaluate. ie.
require("babel").transform("code", { optional: ["minification.constantFolding"] });
$ babel --optional minification.constantFolding script.js
In
var foo = 5 * 5;
Out
var foo = 25;