From 19ba6c6a151faa63ffdb3a172ddb182566b42784 Mon Sep 17 00:00:00 2001 From: Alf Eaton Date: Fri, 9 Feb 2024 09:18:00 +0000 Subject: [PATCH] Use more native code instead of Babel polyfills, for performance (#16966) GitOrigin-RevId: c0f3e611f32a7ed3d691ec8cf1b9a1d7ea4fd97c --- services/web/babel.config.json | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/services/web/babel.config.json b/services/web/babel.config.json index 086f49eb23..0f2fe30012 100644 --- a/services/web/babel.config.json +++ b/services/web/babel.config.json @@ -12,7 +12,15 @@ // Exclude objectSpread polyfill, as it's not needed and affects performance "@babel/plugin-transform-object-rest-spread", // 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" ] } ],