зеркало из https://github.com/nextcloud/text.git
fix: Merge webpack splitChunks options
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Родитель
8409b5a054
Коммит
b9009dc9f6
|
@ -36,14 +36,12 @@ Object.assign(webpackConfig.output, {
|
|||
|
||||
webpackConfig.optimization.chunkIds = 'named'
|
||||
webpackConfig.optimization.splitChunks.cacheGroups = {
|
||||
defaultVendors: {
|
||||
test(module) {
|
||||
return module.resource && module.resource.includes(`${path.sep}node_modules${path.sep}`) &&
|
||||
!module.resource.includes(`${path.sep}highlight.js${path.sep}`)
|
||||
},
|
||||
name: 'vendors',
|
||||
}
|
||||
mermaid: {
|
||||
test: /[\\/]node_modules[\\/](mermaid)[\\/]/,
|
||||
name: 'mermaid',
|
||||
},
|
||||
}
|
||||
webpackConfig.optimization.splitChunks.minSize = 102400
|
||||
|
||||
// Fix Buffer issues
|
||||
webpackConfig.plugins.push(new webpack.ProvidePlugin({
|
||||
|
@ -62,15 +60,4 @@ webpackRules.RULE_RAW_SVGS = {
|
|||
|
||||
webpackConfig.module.rules = Object.values(webpackRules)
|
||||
|
||||
webpackConfig.optimization.splitChunks.minSize = 102400
|
||||
|
||||
webpackConfig.optimization.splitChunks.cacheGroups = {
|
||||
mermaid: {
|
||||
test(module) {
|
||||
return module.resource && module.resource.includes(`${path.sep}node_modules${path.sep}mermaid`)
|
||||
},
|
||||
name: 'mermaid',
|
||||
},
|
||||
}
|
||||
|
||||
module.exports = webpackConfig
|
||||
|
|
Загрузка…
Ссылка в новой задаче