Closed felixcatto closed 6 years ago
Hi, i use babel for transform react code, so after transformations code looks like this https://i.imgur.com/5djHZDr.png
But when i execute this code https://i.imgur.com/6Zg2VW9.png
i got a error https://i.imgur.com/cdIxNGs.png
But if i add "module.exports = Alert;", there is no error and all going good. https://i.imgur.com/86wzyJE.png
I suppose that something wrong with this library. This is example of code from screen
Object.defineProperty(exports, "__esModule", { value: true }); exports.default = Alert; var _react = require('react'); var _react2 = _interopRequireDefault(_react); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function Alert() { return _react2.default.createElement( 'div', null, 'some text' ); }
Hi, i use babel for transform react code, so after transformations code looks like this https://i.imgur.com/5djHZDr.png
But when i execute this code https://i.imgur.com/6Zg2VW9.png
i got a error https://i.imgur.com/cdIxNGs.png
But if i add "module.exports = Alert;", there is no error and all going good. https://i.imgur.com/86wzyJE.png
I suppose that something wrong with this library. This is example of code from screen