Skip to content

Commit

Permalink
docs(builder): add notes for chunk split (#4092)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjiahan committed Jun 29, 2023
1 parent 7930b52 commit 0caa948
Show file tree
Hide file tree
Showing 6 changed files with 129 additions and 70 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,10 @@ export default {

This is an easier way than configuring webpack's splitChunks directly.

:::tip
Chunks split using the `forceSplitting` configuration will be inserted into the HTML file as resources requested for the initial screen using `<script>` tags. Therefore, please split them appropriately based on the actual scenario to avoid excessive size of initial screen resources.
:::

### chunkSplit.splitChunks

When `performance.chunkSplit.strategy` is `custom`, you can specify the custom webpack chunk splitting config via `performance.chunkSplit.splitChunks`. This config will be merged with the webpack splitChunks config (the `cacheGroups` config will also be merged). For example:
Expand Down

0 comments on commit 0caa948

Please sign in to comment.