refactor: change splitChunks file name to vendor.hash.js

This commit is contained in:
Clark Du 2018-03-12 10:32:43 +08:00
parent 096e22affd
commit 365a6adc35
No known key found for this signature in database
GPG Key ID: D0E5986AF78B86D9
2 changed files with 3 additions and 1 deletions

View File

@ -82,7 +82,8 @@ module.exports = function webpackClientConfig() {
// Optimization
config.optimization = {
splitChunks: {
chunks: 'all'
chunks: 'all',
filename: this.getFileName('vendor')
}
}

View File

@ -206,6 +206,7 @@ Options.defaults = {
filenames: {
css: '[name].[contenthash].css',
manifest: 'manifest.[hash].js',
vendor: 'vendor.[chunkhash].js',
app: '[name].[chunkhash].js',
chunk: '[name].[chunkhash].js'
},