class Circle extends Shape {
  getArea() {
    return this.radius * Math.PI * 2;
  }
}

Class inheritance caveats

When using class inheritance with Babel.js, keep in mind that IE10 and below are not supported by default. Babel’s class inheritance relies on __proto__ which is not available on legacy IE versions.

Using super is also not supported on IE8 and below, as it compiles down to using Object.getPrototypeOf.

To get around these caveats, use the protoToAssign transformer to make inheritance work, along with loose mode on classes to enable support for super.

babel --optional spec.protoToAssign --loose es6.classes script.js