fix: Don't transpile ES2018 symbol properties (#9650)

This is a repeat of #5195 to work around the same upstream issue.
This commit is contained in:
Jimmy Jia
2019-03-10 18:22:59 -04:00
committed by Nicolò Ribaudo
parent b2b96e0b15
commit dd2ffda387
2 changed files with 11 additions and 2 deletions

View File

@@ -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];