Skip to content

Support for transform-es2015-classes? #17

@jdelStrother

Description

@jdelStrother

Is there any way of persuading this to work with the transform-es2015-classes plugin (part of the es2015 babel preset) ?

AFAICT sitrep works fine with regular functions and class-methods if you're just compiling to native classes, but if you're using transform-es2015-classes then this source file:

class Foo {
  // sitrep
  logit(a) {
    var b = a * 2
    return b
  }
}

gets transformed to this:

let Foo = function () {
  function Foo() {
    _classCallCheck(this, Foo);
  }

  _createClass(Foo, [{
    key: 'logit',

    // sitrep
    value: function logit(a) {
      var b = a * 2;
      return b;
    }
  }]);

  return Foo;
}();

and the sitrep transform doesn't kick in.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions