webpack splitted chuncks (vue-simple-accordion & vue-cool-lightbox)
This commit is contained in:
@@ -28,7 +28,8 @@ module.exports = {
|
||||
},
|
||||
output: {
|
||||
path: utils.resolve(themePath + '/assets/dist/'),
|
||||
filename: '[name].js'
|
||||
filename: '[name].js',
|
||||
chunkFilename: '[name].js'
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
@@ -111,7 +112,24 @@ module.exports = {
|
||||
// },
|
||||
]
|
||||
},
|
||||
|
||||
optimization: {
|
||||
splitChunks: {
|
||||
cacheGroups: {
|
||||
vsa: {
|
||||
test: /[\\/]node_modules[\\/](vue-simple-accordion)[\\/]/,
|
||||
name: 'vsa',
|
||||
chunks: 'all',
|
||||
usedExports: true
|
||||
},
|
||||
vclb: {
|
||||
test: /[\\/]node_modules[\\/](vue-cool-lightbox)[\\/]/,
|
||||
name: 'vclb',
|
||||
chunks: 'all',
|
||||
usedExports: true
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
new MiniCssExtractPlugin({
|
||||
filename: '[name].css'
|
||||
@@ -128,6 +146,6 @@ module.exports = {
|
||||
extensions: ['.js'],
|
||||
paths: [utils.resolve(themePath + '/assets/dist/')],
|
||||
minBytes: 4096
|
||||
})
|
||||
}),
|
||||
]
|
||||
}
|
||||
|
Reference in New Issue
Block a user