Replace Object.assign
with an inline helper.
In
Object.assign(a, b);
Out
var _extends = ...;
_extends(a, b);
$ npm install babel-plugin-transform-object-assign
.babelrc
{
"plugins": ["transform-object-assign"]
}
$ babel --plugins transform-object-assign script.js
require("babel-core").transform("code", {
plugins: ["transform-object-assign"]
});