Unverified Commit 2cd4f0a7 authored by Sam Poder's avatar Sam Poder Committed by GitHub

[turbopack] Document clusters for chunking (#97267)

Adds docs for `clusters`.
parent 10fe9bea
......@@ -148,6 +148,11 @@ This avoids re-downloading JavaScript the browser already has when navigating.
These change the assumptions the chunker makes when weighing whether merging two
chunks is worth it.
- **`clusters`** (an array of arrays of `RegExp`, e.g.
`[[/^\/dashboard/, /^\/settings/]]`): groups of routes that are commonly
visited together, matched against the route pathname. Turbopack assumes
navigations are likely to stay within a cluster, so chunks shared by a
cluster's routes are merged more eagerly.
- **`firstPageLoadPriority`** (a number between `0` and `1`): how heavily to
weight the benefit of merging chunks for a single page load. Higher values
merge more eagerly. If you don't have a better value, your site's bounce rate
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment