浏览代码

Use more native code instead of Babel polyfills, for performance (#16966)

GitOrigin-RevId: c0f3e611f32a7ed3d691ec8cf1b9a1d7ea4fd97c
Alf Eaton 2 年之前
父节点
当前提交
19ba6c6a15
共有 1 个文件被更改,包括 9 次插入1 次删除
  1. 9 1
      services/web/babel.config.json

+ 9 - 1
services/web/babel.config.json

@@ -12,7 +12,15 @@
           // Exclude objectSpread polyfill, as it's not needed and affects performance
           // Exclude objectSpread polyfill, as it's not needed and affects performance
           "@babel/plugin-transform-object-rest-spread",
           "@babel/plugin-transform-object-rest-spread",
           // Exclude _defineProperty polyfill, as it causes a bug without the objectSpread polyfill
           // Exclude _defineProperty polyfill, as it causes a bug without the objectSpread polyfill
-          "@babel/plugin-transform-computed-properties"
+          "@babel/plugin-transform-computed-properties",
+          // Use native async functions, for performance
+          "@babel/plugin-transform-async-to-generator",
+          // Use native generators, for performance
+          "@babel/plugin-transform-regenerator",
+          // Use native async generators, for performance
+          "@babel/plugin-transform-async-generator-functions",
+          // Use native for-of loops, for performance
+          "@babel/plugin-transform-for-of"
         ]
         ]
       }
       }
     ],
     ],