Commit 427123bd authored by 郝聪敏's avatar 郝聪敏

test: 先下掉分宝

parent de5090e9
...@@ -75,93 +75,93 @@ module.exports = { ...@@ -75,93 +75,93 @@ module.exports = {
} }
} }
], ],
optimization: { // optimization: {
namedModules: true, // namedModules: true,
namedChunks: true, // namedChunks: true,
runtimeChunk: { // runtimeChunk: {
name: 'runtime' // name: 'runtime'
}, // },
splitChunks: // splitChunks:
{ // {
name: false, // name: false,
chunks: 'all', // chunks: 'all',
cacheGroups: // cacheGroups:
{ // {
default: false, // default: false,
saSdk: { // saSdk: {
name: "chunk-sa-sdk", // split cherryUI into a single package // name: "chunk-sa-sdk", // split cherryUI into a single package
priority: 22, // the weight needs to be larger than libs and app or it will be packaged into libs or app // priority: 22, // the weight needs to be larger than libs and app or it will be packaged into libs or app
test: /[\\/]node_modules[\\/]sa-sdk-javascript[\\/]/, // in order to adapt to cnpm // test: /[\\/]node_modules[\\/]sa-sdk-javascript[\\/]/, // in order to adapt to cnpm
enforce: true // enforce: true
}, // },
cherryUI: { // // cherryUI: {
name: 'chunk-cherryUI', // 分离组件库 // // name: 'chunk-cherryUI', // 分离组件库
priority: 21, // // priority: 21,
chunks: 'all', // // chunks: 'all',
test: /[\\/]node_modules[\\/]@qg[\\/]cherry-ui[\\/]/, // // test: /[\\/]node_modules[\\/]@qg[\\/]cherry-ui[\\/]/,
enforce: true // // enforce: true
}, // // },
lodash: { // lodash: {
name: 'chunk-lodash', // 分离组件库 // name: 'chunk-lodash', // 分离组件库
priority: 19, // priority: 19,
test: /[\\/]node_modules[\\/]lodash[\\/]/, // test: /[\\/]node_modules[\\/]lodash[\\/]/,
enforce: true // enforce: true
}, // },
vue: { // vue: {
name: 'chunk-vue', // 分离组件库 // name: 'chunk-vue', // 分离组件库
priority: 17, // priority: 17,
test: /[\\/]node_modules[\\/]vue[\\/]/, // test: /[\\/]node_modules[\\/]vue[\\/]/,
enforce: true // enforce: true
}, // },
iview: { // iview: {
name: 'chunk-iview', // 分离组件库 // name: 'chunk-iview', // 分离组件库
priority: 16, // priority: 16,
test: /[\\/]node_modules[\\/]iview[\\/]/, // test: /[\\/]node_modules[\\/]iview[\\/]/,
enforce: true // enforce: true
}, // },
lodash: { // lodash: {
name: 'chunk-lodash', // 分离组件库 // name: 'chunk-lodash', // 分离组件库
priority: 15, // priority: 15,
test: /[\\/]node_modules[\\/]lodash[\\/]/, // test: /[\\/]node_modules[\\/]lodash[\\/]/,
enforce: true // enforce: true
}, // },
ravenJs: { // ravenJs: {
name: 'chunk-ravenJs', // 分离组件库 // name: 'chunk-ravenJs', // 分离组件库
priority: 14, // priority: 14,
test: /[\\/]node_modules[\\/]raven-js[\\/]/, // test: /[\\/]node_modules[\\/]raven-js[\\/]/,
enforce: true // enforce: true
}, // },
common: { // common: {
name:'chunk-common', // name:'chunk-common',
minChunks: 3, // minChunks: 3,
priority: 3, // priority: 3,
reuseExistingChunk: true, // reuseExistingChunk: true,
chunks (chunk) { // chunks (chunk) {
return ['login','editor','activity'].includes(chunk.name); // return ['login','editor','activity'].includes(chunk.name);
}, // },
enforce: true // enforce: true
}, // },
vendors: // vendors:
{ // {
name: 'common', // name: 'common',
chunks: 'all', // chunks: 'all',
minChunks: 3, // minChunks: 3,
priority: 2, // priority: 2,
test: /node_modules/, // test: /node_modules/,
reuseExistingChunk: true // reuseExistingChunk: true
}, // },
styles: // styles:
{ // {
name: 'common', // name: 'common',
chunks: 'all', // chunks: 'all',
minChunks: 3, // minChunks: 3,
priority: 1, // priority: 1,
test: /\.(css|less|scss|stylus)$/, // test: /\.(css|less|scss|stylus)$/,
priority: 50, // priority: 50,
} // }
} // }
} // }
}, // },
devtool:'source-map', devtool:'source-map',
customize(webpackConfig){ customize(webpackConfig){
// 此外 webpackConfig 为原生生成的 webpack config,可以进行自定义处理 // 此外 webpackConfig 为原生生成的 webpack config,可以进行自定义处理
......
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