跳到主要内容

@babel/plugin-external-helpers

npm install --save-dev @babel/plugin-external-helpers

Usage

babel.config.json
{
"plugins": ["@babel/plugin-external-helpers"]
}

Via CLI

Shell
babel --plugins @babel/plugin-external-helpers script.js

Via Node API

JavaScript
require("@babel/core").transformSync("code", {
plugins: ["@babel/plugin-external-helpers"]
});