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
2019-03-19 10:53:57 +08:00

31 lines
762 B
JavaScript

module.exports = {
publicPath: process.env.NODE_ENV === 'production' ? './' : '/',
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
}
}
})
}
}