From 831111259998d08ad35b7e89e4a3fbe226bb2a7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=BDvelc?= Date: Wed, 11 Nov 2015 15:26:01 +0100 Subject: [PATCH] Babel 6 export default support --- lib/Component.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/Component.js b/lib/Component.js index bed565d..733a0ed 100644 --- a/lib/Component.js +++ b/lib/Component.js @@ -38,6 +38,9 @@ Component.prototype.getComponent = function getComponent(cb) { try { this.component = require(this.path); + if (this.component && typeof this.component === 'object' && this.component.default) { + this.component = this.component.default + } } catch(err) { return cb(err); }