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

feat: 优化构建测试

parent 0c7489e4
...@@ -51,6 +51,7 @@ const plugins = [ ...@@ -51,6 +51,7 @@ const plugins = [
export default { export default {
antd: {}, antd: {},
chunks: ['antdesigns', 'vendors', 'mapvgl', 'umi'],
dva: { dva: {
hmr: true, hmr: true,
}, },
......
...@@ -88,7 +88,7 @@ export default config => { ...@@ -88,7 +88,7 @@ export default config => {
vendors: { vendors: {
name: 'vendors', name: 'vendors',
chunks: 'all', 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, priority: 10,
enforce: true, enforce: true,
}, },
...@@ -98,15 +98,6 @@ export default config => { ...@@ -98,15 +98,6 @@ export default config => {
test: /[\\/]node_modules[\\/](mapvgl|react-bmapgl|react-amap)/, test: /[\\/]node_modules[\\/](mapvgl|react-bmapgl|react-amap)/,
priority: 11, 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