You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.1 KiB
47 lines
1.1 KiB
export default {
|
|
hash: true,
|
|
nodeModulesTransform: {
|
|
type: 'none',
|
|
},
|
|
define: {
|
|
'process.env.UMI_ENV': 'prod',
|
|
},
|
|
extraBabelPlugins: [
|
|
'transform-remove-console',
|
|
['babel-plugin-import', { libraryName: 'antd', libraryDirectory: 'es', style: true }, 'antd'],
|
|
[
|
|
'babel-plugin-import',
|
|
{ libraryName: '@formily/antd', libraryDirectory: 'esm', style: true },
|
|
'@formily/antd',
|
|
],
|
|
],
|
|
targets: {
|
|
ie: 11,
|
|
},
|
|
dynamicImport: {
|
|
loading: '@/pages/Loading',
|
|
},
|
|
ignoreMomentLocale: true,
|
|
chunks: ['vendors', 'umi'],
|
|
chainWebpack: function (config, { webpack }) {
|
|
config.merge({
|
|
optimization: {
|
|
splitChunks: {
|
|
chunks: 'all',
|
|
minSize: 0,
|
|
minChunks: 1,
|
|
automaticNameDelimiter: '.',
|
|
cacheGroups: {
|
|
vendors: {
|
|
name: 'vendors',
|
|
test({ resource }) {
|
|
return /[\\/]node_modules[\\/]/.test(resource);
|
|
},
|
|
priority: 10,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
});
|
|
},
|
|
};
|
|
|