$ npm install babel-plugin-minify-builtins
Minify Standard built-in Objects
In
Math.floor(a) + Math.floor(b)
Out
var _Mathfloor = Math.floor;
_Mathfloor(a) + _Mathfloor(b);
npm install babel-plugin-minify-builtins --save-dev
.babelrc
(Recommended).babelrc
{
"plugins": ["minify-builtins"]
}
babel --plugins minify-builtins script.js
require("@babel/core").transform("code", {
plugins: ["minify-builtins"]
});
tdz
- Account for TDZ (Temporal Dead Zone)© 2010 - cnpmjs.org x YWFE | Home | YWFE