mirror of
https://github.com/ant-design/ant-design.git
synced 2026-02-08 18:39:20 +08:00
15 lines
378 B
JavaScript
15 lines
378 B
JavaScript
const antd = require('./components');
|
|
|
|
const req = require.context('./components', true, /^\.\/locale\/[A-Za-z]+_[A-Za-z]+\.tsx?$/);
|
|
|
|
const antdWithLocales = { ...antd };
|
|
|
|
antdWithLocales.locales = {};
|
|
|
|
req.keys().forEach((mod) => {
|
|
const matches = mod.match(/\/([^/]+).tsx?$/);
|
|
antdWithLocales.locales[matches[1]] = req(mod).default;
|
|
});
|
|
|
|
module.exports = antdWithLocales;
|