diff --git a/packages/babel-plugin-transform-runtime/scripts/build-dist.js b/packages/babel-plugin-transform-runtime/scripts/build-dist.js index 4f8375d284e9..590440aff352 100644 --- a/packages/babel-plugin-transform-runtime/scripts/build-dist.js +++ b/packages/babel-plugin-transform-runtime/scripts/build-dist.js @@ -19,7 +19,15 @@ writeHelpers("@babel/runtime-corejs2", { corejs: 2 }); function writeCoreJS2(runtimeName) { const pkgDirname = getRuntimeRoot(runtimeName); - const paths = ["is-iterable", "get-iterator"]; + const paths = [ + "is-iterable", + "get-iterator", + + // This was previously in definitions, but was removed to work around + // zloirock/core-js#262. We need to keep it in @babel/runtime-corejs2 to + // avoid a breaking change there. + "symbol/async-iterator", + ]; Object.keys(corejs2Definitions.builtins).forEach(key => { const path = corejs2Definitions.builtins[key]; diff --git a/packages/babel-plugin-transform-runtime/src/definitions.js b/packages/babel-plugin-transform-runtime/src/definitions.js index ac044910a08e..b0874d080338 100644 --- a/packages/babel-plugin-transform-runtime/src/definitions.js +++ b/packages/babel-plugin-transform-runtime/src/definitions.js @@ -109,7 +109,8 @@ export default runtimeVersion => { : {}), Symbol: { - asyncIterator: "symbol/async-iterator", + // FIXME: Disabled to work around zloirock/core-js#262. + // asyncIterator: "symbol/async-iterator", for: "symbol/for", hasInstance: "symbol/has-instance", isConcatSpreadable: "symbol/is-concat-spreadable",