ant-design-vue/index-with-locales.js

12 lines
304 B
JavaScript
Raw Normal View History

2019-01-12 11:33:27 +08:00
const antd = require('./components');
2021-03-04 21:39:11 +08:00
const req = require.context('./components', true, /^\.\/locale-provider\/(?!__tests__).+_.+\.ts$/);
2018-03-18 19:59:38 +08:00
2019-01-12 11:33:27 +08:00
antd.locales = {};
2018-03-18 19:59:38 +08:00
2019-01-12 11:33:27 +08:00
req.keys().forEach(mod => {
const match = mod.match(/\/([^/]+).js$/);
antd.locales[match[1]] = req(mod).default;
});
2018-03-18 19:59:38 +08:00
2019-01-12 11:33:27 +08:00
module.exports = antd;