[hotfix] Use same targets for fields as for private methods (#11633)
This commit is contained in:
parent
05804b166c
commit
32bd530f25
@ -19,4 +19,7 @@ for (const plugin of Object.keys(bugfixPlugins)) {
|
||||
}
|
||||
}
|
||||
|
||||
pluginsFiltered["proposal-class-properties"] =
|
||||
pluginsFiltered["proposal-private-methods"];
|
||||
|
||||
export { pluginsFiltered as plugins, bugfixPluginsFiltered as pluginsBugfixes };
|
||||
|
||||
@ -9,7 +9,7 @@ Using modules transform: auto
|
||||
|
||||
Using plugins:
|
||||
syntax-numeric-separator { "chrome":"80" }
|
||||
syntax-class-properties { "chrome":"80" }
|
||||
proposal-class-properties { "chrome":"80" }
|
||||
proposal-private-methods { "chrome":"80" }
|
||||
syntax-nullish-coalescing-operator { "chrome":"80" }
|
||||
syntax-optional-chaining { "chrome":"80" }
|
||||
|
||||
3
packages/babel-preset-env/test/fixtures/shipped-proposals/node-12/input.js
vendored
Normal file
3
packages/babel-preset-env/test/fixtures/shipped-proposals/node-12/input.js
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
class A {
|
||||
x;
|
||||
}
|
||||
8
packages/babel-preset-env/test/fixtures/shipped-proposals/node-12/options.json
vendored
Normal file
8
packages/babel-preset-env/test/fixtures/shipped-proposals/node-12/options.json
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"presets": [
|
||||
["env", {
|
||||
"targets": { "node": 12 },
|
||||
"shippedProposals": true
|
||||
}]
|
||||
]
|
||||
}
|
||||
8
packages/babel-preset-env/test/fixtures/shipped-proposals/node-12/output.js
vendored
Normal file
8
packages/babel-preset-env/test/fixtures/shipped-proposals/node-12/output.js
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||
|
||||
class A {
|
||||
constructor() {
|
||||
_defineProperty(this, "x", void 0);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user