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); }