File size: 307 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
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;