From f844bc32ee237d16070f16954664cf473a5a5d54 Mon Sep 17 00:00:00 2001 From: yiminghe Date: Wed, 22 Jun 2016 13:31:04 +0800 Subject: [PATCH] fix dist --- index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index c87bf1e237..4898a3ab53 100644 --- a/index.js +++ b/index.js @@ -11,7 +11,10 @@ function camelCase(name) { const req = require.context('./components', true, /^\.\/[^_][\w-]+\/(style\/)?index\.tsx?$/); req.keys().forEach((mod) => { - const v = req(mod); + let v = req(mod); + if (v && v.default) { + v = v.default; + } const match = mod.match(/^\.\/([^_][\w-]+)\/index\.tsx?$/); if (match && match[1]) { if (match[1] === 'message' || match[1] === 'notification') {