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:
parent
b2b96e0b15
commit
dd2ffda387
@ -19,7 +19,15 @@ writeHelpers("@babel/runtime-corejs2", { corejs: 2 });
|
|||||||
function writeCoreJS2(runtimeName) {
|
function writeCoreJS2(runtimeName) {
|
||||||
const pkgDirname = getRuntimeRoot(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 => {
|
Object.keys(corejs2Definitions.builtins).forEach(key => {
|
||||||
const path = corejs2Definitions.builtins[key];
|
const path = corejs2Definitions.builtins[key];
|
||||||
|
|||||||
@ -109,7 +109,8 @@ export default runtimeVersion => {
|
|||||||
: {}),
|
: {}),
|
||||||
|
|
||||||
Symbol: {
|
Symbol: {
|
||||||
asyncIterator: "symbol/async-iterator",
|
// FIXME: Disabled to work around zloirock/core-js#262.
|
||||||
|
// asyncIterator: "symbol/async-iterator",
|
||||||
for: "symbol/for",
|
for: "symbol/for",
|
||||||
hasInstance: "symbol/has-instance",
|
hasInstance: "symbol/has-instance",
|
||||||
isConcatSpreadable: "symbol/is-concat-spreadable",
|
isConcatSpreadable: "symbol/is-concat-spreadable",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user