Babel error: Class constructor Foo cannot be invoked without 'new'
问题 I am using babel to transpile. I have class BaseComponent which is extended by class Logger . When I run new Logger() in the browser, I am getting this error Class constructor BaseComponent cannot be invoked without 'new' the code that throws this is: var Logger = function (_BaseComponent) { _inherits(Logger, _BaseComponent); function Logger() { _classCallCheck(this, Logger); return _possibleConstructorReturn(this, Object.getPrototypeOf(Logger).call(this, "n")); //throws here } 回答1: Due to