1
0
This repository has been archived on 2024-03-25. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
vue-clamp/vue.config.js
2018-12-20 16:21:03 +08:00

32 lines
754 B
JavaScript

module.exports = {
outputDir: 'demo',
transpileDependencies: ['resize-detector'],
chainWebpack: config => {
config.optimization
.clear('splitChunks')
.splitChunks({
cacheGroups: {
vue: {
name: 'vue',
test: /[\\/]node_modules[\\/]vue[\\/]/,
priority: 0,
chunks: 'initial'
},
vendors: {
name: 'chunk-vendors',
test: /[\\/]node_modules[\\/]/,
priority: -10,
chunks: 'initial'
},
common: {
name: 'chunk-common',
minChunks: 2,
priority: -20,
chunks: 'initial',
reuseExistingChunk: true
}
}
})
}
}