From 3e4f7cc89a3ef9149b93df7cd23b4521cc875075 Mon Sep 17 00:00:00 2001 From: superburrito Date: Mon, 21 Jan 2019 12:15:34 +0800 Subject: [PATCH 1/4] docs(config): Highlight merging of chunks when splitChunks.name is a specific string --- src/content/plugins/split-chunks-plugin.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/content/plugins/split-chunks-plugin.md b/src/content/plugins/split-chunks-plugin.md index 4c286e910617..6d9180ae0707 100644 --- a/src/content/plugins/split-chunks-plugin.md +++ b/src/content/plugins/split-chunks-plugin.md @@ -10,6 +10,7 @@ contributors: - jacobangel - madhavarshney - sakhisheikh + - superburrito related: - title: webpack's automatic deduplication algorithm example url: https://github.com/webpack/webpack/blob/master/examples/many-pages/README.md @@ -164,7 +165,11 @@ T> `maxSize` takes higher priority than `maxInitialRequest/maxAsyncRequests`. Ac `boolean: true | function (module, chunks, cacheGroupKey) | string` -The name of the split chunk. Providing `true` will automatically generate a name based on chunks and cache group key. Providing a string or function will allow you to use a custom name. If the name matches an entry point name, the entry point will be removed. +The name of the split chunk. Providing `true` will automatically generate a name based on chunks and cache group key. + +Providing a string or a function allows you to use a custom name. Specifying a string (or a function that always returns the same string) will merge all common modules and vendors into a single chunk. This probably leads to more code downloaded than needed. + +If the name matches an entry point name, the entry point will be removed. T> It is recommended to set `splitChunks.name` to `false` for production builds so that it doesn't change names unnecessarily. From c65d8a7975a9cbb8283096a941a315ba2df92ee1 Mon Sep 17 00:00:00 2001 From: Eugene Hlushko Date: Fri, 8 Feb 2019 15:13:28 +0800 Subject: [PATCH 2/4] Update src/content/plugins/split-chunks-plugin.md Co-Authored-By: superburrito --- 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 6d9180ae0707..174a97a5bb74 100644 --- a/src/content/plugins/split-chunks-plugin.md +++ b/src/content/plugins/split-chunks-plugin.md @@ -169,7 +169,7 @@ The name of the split chunk. Providing `true` will automatically generate a name Providing a string or a function allows you to use a custom name. Specifying a string (or a function that always returns the same string) will merge all common modules and vendors into a single chunk. This probably leads to more code downloaded than needed. -If the name matches an entry point name, the entry point will be removed. +If the name matches an [entry point](/configuration/entry-context/#entry) name, the entry point will be removed. T> It is recommended to set `splitChunks.name` to `false` for production builds so that it doesn't change names unnecessarily. From 21b81ccc49865df9731f0a4b4a3430391540fde3 Mon Sep 17 00:00:00 2001 From: superburrito Date: Fri, 8 Feb 2019 15:19:43 +0800 Subject: [PATCH 3/4] Use either ... or --- 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 174a97a5bb74..2658fda78bda 100644 --- a/src/content/plugins/split-chunks-plugin.md +++ b/src/content/plugins/split-chunks-plugin.md @@ -167,7 +167,7 @@ T> `maxSize` takes higher priority than `maxInitialRequest/maxAsyncRequests`. Ac The name of the split chunk. Providing `true` will automatically generate a name based on chunks and cache group key. -Providing a string or a function allows you to use a custom name. Specifying a string (or a function that always returns the same string) will merge all common modules and vendors into a single chunk. This probably leads to more code downloaded than needed. +Providing a string or a function allows you to use a custom name. Specifying either a string or a function that always returns the same string will merge all common modules and vendors into a single chunk. This might lead to bigger initial downloads and slow down page loads. If the name matches an [entry point](/configuration/entry-context/#entry) name, the entry point will be removed. From 6e0a521d4f744a6a250c1587b380cbd6a67e6948 Mon Sep 17 00:00:00 2001 From: Eugene Hlushko Date: Mon, 11 Feb 2019 10:40:35 +0800 Subject: [PATCH 4/4] Update src/content/plugins/split-chunks-plugin.md Co-Authored-By: superburrito --- 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 2658fda78bda..49dc0fe3ff5b 100644 --- a/src/content/plugins/split-chunks-plugin.md +++ b/src/content/plugins/split-chunks-plugin.md @@ -169,7 +169,7 @@ The name of the split chunk. Providing `true` will automatically generate a name Providing a string or a function allows you to use a custom name. Specifying either a string or a function that always returns the same string will merge all common modules and vendors into a single chunk. This might lead to bigger initial downloads and slow down page loads. -If the name matches an [entry point](/configuration/entry-context/#entry) name, the entry point will be removed. +If the `splitChunks.name` matches an [entry point](/configuration/entry-context/#entry) name, the entry point will be removed. T> It is recommended to set `splitChunks.name` to `false` for production builds so that it doesn't change names unnecessarily.