mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 02:59:58 +08:00
Upgrade antd-tools
This commit is contained in:
parent
839703bb55
commit
4431c5d70d
@ -84,7 +84,7 @@
|
||||
"devDependencies": {
|
||||
"@types/react": "^15.0.38",
|
||||
"@types/react-dom": "~0.14.18",
|
||||
"antd-tools": "~3.0.0",
|
||||
"antd-tools": "^4.0.1",
|
||||
"babel-cli": "^6.18.0",
|
||||
"babel-eslint": "^8.0.1",
|
||||
"babel-plugin-import": "^1.0.0",
|
||||
|
@ -19,13 +19,22 @@ function addLocales(webpackConfig) {
|
||||
webpackConfig.output.filename = '[name].js';
|
||||
}
|
||||
|
||||
module.exports = function (webpackConfig) {
|
||||
webpackConfig = getWebpackConfig(webpackConfig, true);
|
||||
if (process.env.RUN_ENV === 'PRODUCTION') {
|
||||
webpackConfig.forEach((config) => {
|
||||
ignoreMomentLocale(config);
|
||||
addLocales(config);
|
||||
});
|
||||
}
|
||||
return webpackConfig;
|
||||
};
|
||||
function externalMoment(config) {
|
||||
config.externals.moment = {
|
||||
root: 'moment',
|
||||
commonjs2: 'moment',
|
||||
commonjs: 'moment',
|
||||
amd: 'moment',
|
||||
};
|
||||
}
|
||||
|
||||
const webpackConfig = getWebpackConfig(false);
|
||||
if (process.env.RUN_ENV === 'PRODUCTION') {
|
||||
webpackConfig.forEach((config) => {
|
||||
ignoreMomentLocale(config);
|
||||
externalMoment(config);
|
||||
addLocales(config);
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = webpackConfig[0];
|
||||
|
Loading…
Reference in New Issue
Block a user