From edc25742461b38e92ba705f0bc8e55dd1d6e0843 Mon Sep 17 00:00:00 2001 From: Lesha Kostiuchenko Date: Sat, 3 Sep 2022 11:57:00 +0200 Subject: [PATCH] Improve IE11 compatibility by tranforming for-of loops with babel --- .babelrc.js | 1 + package.json | 1 + yarn.lock | 12 ++++++++++++ 3 files changed, 14 insertions(+) diff --git a/.babelrc.js b/.babelrc.js index d63fc08a1e..f334c5343f 100644 --- a/.babelrc.js +++ b/.babelrc.js @@ -10,6 +10,7 @@ const plugins = [ '@babel/plugin-proposal-object-rest-spread', '@babel/plugin-transform-shorthand-properties', '@babel/plugin-proposal-nullish-coalescing-operator', + '@babel/plugin-transform-for-of', ] if (process.env.BABEL_ENV !== 'esm') { diff --git a/package.json b/package.json index fb6ce2fcb1..980a432172 100644 --- a/package.json +++ b/package.json @@ -49,6 +49,7 @@ "@babel/plugin-transform-arrow-functions": "^7.2.0", "@babel/plugin-transform-block-scoping": "^7.5.5", "@babel/plugin-transform-destructuring": "^7.5.0", + "@babel/plugin-transform-for-of": "^7.18.8", "@babel/plugin-transform-modules-commonjs": "^7.5.0", "@babel/plugin-transform-parameters": "^7.4.4", "@babel/plugin-transform-template-literals": "^7.4.4", diff --git a/yarn.lock b/yarn.lock index c655f1f278..7e6e0a12e8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -550,6 +550,11 @@ resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.16.7.tgz#aa3a8ab4c3cceff8e65eb9e73d87dc4ff320b2f5" integrity sha512-Qg3Nk7ZxpgMrsox6HreY1ZNKdBq7K72tDSliA6dCl5f007jR4ne8iD5UzuNnCJH2xBf2BEEVGr+/OL6Gdp7RxA== +"@babel/helper-plugin-utils@^7.18.6": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.18.9.tgz#4b8aea3b069d8cb8a72cdfe28ddf5ceca695ef2f" + integrity sha512-aBXPT3bmtLryXaoJLyYPXPlSD4p1ld9aYeR+sJNOZjJJGiOpb+fKfh3NkcCu7J54nUJwCERPBExCCpyCOHnu/w== + "@babel/helper-regex@^7.10.4": version "7.10.5" resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.10.5.tgz#32dfbb79899073c415557053a19bd055aae50ae0" @@ -1170,6 +1175,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" +"@babel/plugin-transform-for-of@^7.18.8": + version "7.18.8" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.18.8.tgz#6ef8a50b244eb6a0bdbad0c7c61877e4e30097c1" + integrity sha512-yEfTRnjuskWYo0k1mHUqrVWaZwrdq8AYbfrpqULOJOaucGSp4mNMVps+YtA8byoevxS/urwU75vyhQIxcCgiBQ== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/plugin-transform-function-name@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.10.4.tgz#6a467880e0fc9638514ba369111811ddbe2644b7"