From 864b978fc1176a6537273b22503fdeb0d9cb8c6e Mon Sep 17 00:00:00 2001 From: EugeneHlushko Date: Tue, 18 Sep 2018 15:17:14 +0300 Subject: [PATCH 1/2] docs(plugins) scp reuseExistingChunk title nesting fix --- src/content/plugins/split-chunks-plugin.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/content/plugins/split-chunks-plugin.md b/src/content/plugins/split-chunks-plugin.md index f46a251cba6a..732fece29531 100644 --- a/src/content/plugins/split-chunks-plugin.md +++ b/src/content/plugins/split-chunks-plugin.md @@ -199,12 +199,27 @@ module.exports = { A module can belong to multiple cache groups. The optimization will prefer the cache group with a higher `priority`. The default groups have a negative priority to allow custom groups to take higher priority (default value is `0` for custom groups). -#### `splitChunks.cacheGroups.reuseExistingChunk` +#### `splitChunks.cacheGroups.cacheGroup.reuseExistingChunk` `boolean` If the current chunk contains modules already split out from the main bundle, it will be reused instead of a new one being generated. This can impact the resulting file name of the chunk. +```js +module.exports = { + //... + optimization: { + splitChunks: { + cacheGroups: { + vendors: { + reuseExistingChunk: true + } + } + } + } +}; +``` + #### `splitChunks.cacheGroups.test` `function` `RegExp` `string` From 5ff4912d7f820c427002e2fc3ff100e5da2816f2 Mon Sep 17 00:00:00 2001 From: EugeneHlushko Date: Mon, 24 Sep 2018 11:22:12 +0300 Subject: [PATCH 2/2] docs(plugins) scp reuseExistingChunk title notation --- src/content/plugins/split-chunks-plugin.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/plugins/split-chunks-plugin.md b/src/content/plugins/split-chunks-plugin.md index 732fece29531..1ad4e337c948 100644 --- a/src/content/plugins/split-chunks-plugin.md +++ b/src/content/plugins/split-chunks-plugin.md @@ -199,7 +199,7 @@ module.exports = { A module can belong to multiple cache groups. The optimization will prefer the cache group with a higher `priority`. The default groups have a negative priority to allow custom groups to take higher priority (default value is `0` for custom groups). -#### `splitChunks.cacheGroups.cacheGroup.reuseExistingChunk` +#### `splitChunks.cacheGroups.{cacheGroup}.reuseExistingChunk` `boolean`