mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-24 07:28:28 +08:00
f6c235462e
* chore: rm locale-receiver * chore: export useLocale in locale * chore: comment * chore: rm locale-provider dir * docs: rm locale-provider in migration document * chore: fix regexp --------- Co-authored-by: MadCcc <1075746765@qq.com>
13 lines
307 B
JavaScript
13 lines
307 B
JavaScript
const antd = require('./components');
|
|
|
|
const req = require.context('./components', true, /^\.\/locale\/[A-Za-z]+_[A-Za-z]+\.tsx?$/);
|
|
|
|
antd.locales = {};
|
|
|
|
req.keys().forEach((mod) => {
|
|
const matches = mod.match(/\/([^/]+).tsx?$/);
|
|
antd.locales[matches[1]] = req(mod).default;
|
|
});
|
|
|
|
module.exports = antd;
|