@babel/plugin-transform-runtime

Externalise references to helpers and builtins, automatically polyfilling your code without polluting globals

将对辅助函数和内置函数的引用外部化,在不污染全局变量的情况下自动填充代码

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
{
  "plugins": [
    [
      "@babel/plugin-transform-runtime",
      {
        "absoluteRuntime": false,
        "corejs": false,
        "helpers": true,
        "regenerator": true,
        "version": "7.0.0-beta.0"
      }
    ]
  ]
}