From c23ba6371e78b742499e53c61215f88063c8d39b Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Sun, 24 Apr 2022 06:06:02 +0530 Subject: [PATCH] docs: add info about moving modules to parent chunks --- src/content/plugins/split-chunks-plugin.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/content/plugins/split-chunks-plugin.mdx b/src/content/plugins/split-chunks-plugin.mdx index f6869e80818e..f72d7f5bee65 100644 --- a/src/content/plugins/split-chunks-plugin.mdx +++ b/src/content/plugins/split-chunks-plugin.mdx @@ -251,6 +251,8 @@ If you choose to specify a function, you may find the `chunk.name` and `chunk.ha If the `splitChunks.name` matches an [entry point](/configuration/entry-context/#entry) name, the entry point will be removed. +T> `splitChunks.cacheGroups.{cacheGroup}.name` can be used to move modules into a chunk that is a parent of the source chunk. For example, use `name: "entry-name"` to move modules into the `entry-name` chunk. You can also use on demand named chunks, but you must be careful that the selected modules are only used under this chunk. + **main.js** ```js