diff --git a/index.js b/index.js index 9df030350..1cbf08802 100644 --- a/index.js +++ b/index.js @@ -9,14 +9,14 @@ function camelCase(name) { } // Just import style for https://github.com/ant-design/ant-design/issues/3745 -const req = require.context('./components', true, /^\.\/[^_][\w-]+\/style\/index\.js?$/); +const req = require.context('./components', true, /^\.\/[^_][\w-]+\/style\/index\.tsx?$/); req.keys().forEach(mod => { let v = req(mod); if (v && v.default) { v = v.default; } - const match = mod.match(/^\.\/([^_][\w-]+)\/index\.js?$/); + const match = mod.match(/^\.\/([^_][\w-]+)\/index\.tsx?$/); if (match && match[1]) { if (match[1] === 'message' || match[1] === 'notification') { // message & notification should not be capitalized