Commit 141b4eca authored by 郭志伟's avatar 郭志伟

feat: 优化构建测试

parent 0c7489e4
......@@ -51,6 +51,7 @@ const plugins = [
export default {
antd: {},
chunks: ['antdesigns', 'vendors', 'mapvgl', 'umi'],
dva: {
hmr: true,
},
......
......@@ -88,7 +88,7 @@ export default config => {
vendors: {
name: 'vendors',
chunks: 'all',
test: /[\\/]node_modules[\\/](lodash|moment|react|dva|postcss|mapbox-gl|date-fns|sentry|react-sortablejs|sortablejs)/,
test: /([\\/]node_modules[\\/](lodash|moment|react|dva|postcss|mapbox-gl|date-fns|sentry|react-sortablejs|sortablejs))|([\\/]src[\\/]utils[\\/]qiniu\.min\.js)/,
priority: 10,
enforce: true,
},
......@@ -98,15 +98,6 @@ export default config => {
test: /[\\/]node_modules[\\/](mapvgl|react-bmapgl|react-amap)/,
priority: 11,
},
commons: {
name: 'commons',
// 其余同步加载包
chunks: 'all',
minChunks: 2,
priority: 1,
// refer: https://github.com/webpack-contrib/mini-css-extract-plugin/issues/257#issuecomment-432594711
enforce: true,
},
},
});
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment