@babel/plugin-external-helpers
npm install --save-dev @babel/plugin-external-helpers
Usage
Via .babelrc (Recommended)
.babelrc
{
"plugins": ["@babel/plugin-external-helpers"]
}
Via CLI
babel --plugins @babel/plugin-external-helpers script.js
Via Node API
require("@babel/core").transform("code", {
plugins: ["@babel/plugin-external-helpers"]
});