2019-01-12 03:33:27 +00:00
|
|
|
const antd = require('./components');
|
2022-03-12 15:00:23 +00:00
|
|
|
|
|
|
|
const req = require.context('./components', true, /^\.\/locale\/.+_.+\.tsx$/);
|
2018-03-18 11:59:38 +00:00
|
|
|
|
2019-01-12 03:33:27 +00:00
|
|
|
antd.locales = {};
|
2018-03-18 11:59:38 +00:00
|
|
|
|
2019-01-12 03:33:27 +00:00
|
|
|
req.keys().forEach(mod => {
|
2022-03-12 15:00:23 +00:00
|
|
|
const matches = mod.match(/\/([^/]+).tsx$/);
|
|
|
|
antd.locales[matches[1]] = req(mod).default;
|
2019-01-12 03:33:27 +00:00
|
|
|
});
|
2018-03-18 11:59:38 +00:00
|
|
|
|
2019-01-12 03:33:27 +00:00
|
|
|
module.exports = antd;
|