Skip to content

Commit 9d15541

Browse files
authored
docs: add info about moving modules to parent chunks (#6104)
1 parent 80e0084 commit 9d15541

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/content/plugins/split-chunks-plugin.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,8 @@ If you choose to specify a function, you may find the `chunk.name` and `chunk.ha
251251

252252
If the `splitChunks.name` matches an [entry point](/configuration/entry-context/#entry) name, the entry point will be removed.
253253

254+
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.
255+
254256
**main.js**
255257

256258
```js

0 commit comments

Comments
 (0)