微信小程序 编译调整

This commit is contained in:
Wang Kejun 2023-01-09 18:24:22 +08:00
parent 5e7d1d27b2
commit 356578bed2
1 changed files with 38 additions and 23 deletions

View File

@ -410,39 +410,54 @@ class OakWeChatMpPlugin {
cacheGroups: { cacheGroups: {
default: false, default: false,
// oak_app_domain: { oak_app_domain: {
chunks: 'all',
test: /[\\/]oak-app-domain[\\/]/,
name: 'oak_app_domain',
minChunks: 0,
},
oak_domain: {
chunks: 'all',
test: /[\\/]oak-domain[\\/]/,
name: 'oak_domain',
minChunks: 0,
},
oak_external_sdk: {
chunks: 'all',
test: /[\\/]oak-external-sdk[\\/]/,
name: 'oak_external_sdk',
minChunks: 0,
},
oak_frontend_base: {
chunks: 'all',
test: /[\\/]oak-frontend-base[\\/]/,
name: 'oak_frontend_base',
minChunks: 0,
},
// oak_memory_tree_store: {
// chunks: 'all', // chunks: 'all',
// test: /[\\/]oak-app-domain[\\/]/, // test: /[\\/]oak-memory-tree-store[\\/]/,
// name: 'oak_app_domain', // name: 'oak_memory_tree_store',
// minChunks: 0, // minChunks: 0,
// }, // },
// oak_domain: { echarts: {
// chunks: 'all', chunks: 'all',
// test: /[\\/]oak-domain[\\/]/, test: /[\\/]miniprogram_npm\/ec-canvas\/echarts\.js$/,
// name: 'oak_domain', name: 'echarts',
// minChunks: 0, minChunks: 0,
// }, },
// oak_external_sdk: {
// chunks: 'all',
// test: /[\\/]oak-external-sdk[\\/]/,
// name: 'oak_external_sdk',
// minChunks: 0,
// },
// oak_frontend_base: {
// chunks: 'all',
// test: /[\\/]oak-frontend-base[\\/]/,
// name: 'oak_frontend_base',
// minChunks: 0,
// },
vendor: { vendor: {
chunks: 'all', chunks: 'all',
test: /[\\/]node_modules[\\/]/, test: /[\\/]node_modules[\\/]/,
name: vendorChunkName, name: vendorChunkName,
minChunks: 0, minChunks: 0,
reuseExistingChunk: true,
}, },
// 其他公用代码 // 其他公用代码