@babel/plugin-transform-property-mutators

    1. var foo = Object.defineProperties(
    2. {},
    3. bar: {
    4. get: function() {
    5. return this._bar;
    6. set: function(value) {
    7. this._bar = value;
    8. },
    9. configurable: true,
    10. },
    11. );
    1. {
    2. "plugins": ["@babel/plugin-transform-property-mutators"]
    3. }
    1. require("@babel/core").transformSync("code", {
    2. plugins: ["@babel/plugin-transform-property-mutators"],