docs: improve readability of optimization.chunkIds documentation#8068
docs: improve readability of optimization.chunkIds documentation#8068alexander-akait merged 4 commits intowebpack:mainfrom
Conversation
Ref: webpack#6356 (related) ### Summary This PR improves the readability of the `optimization.chunkIds` section by simplifying how types are described and making the default behavior easier to understand. ### Type of change - Documentation enhancement ### Testing - Not applicable (documentation-only change) ### Breaking changes - None
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| ## optimization.chunkIds | ||
|
|
||
| `boolean = false` `string: 'natural' | 'named' | 'size' | 'total-size' | 'deterministic'` | ||
| Type: boolean | string |
There was a problem hiding this comment.
Please don't change type, because string is wrong type here
Fix incorrect `string` type for `optimization.chunkIds` and document allowed values explicitly.
|
Thanks for pointing that out! Updated the type to use the correct allowed values. |
| ## optimization.chunkIds | ||
|
|
||
| `boolean = false` `string: 'natural' | 'named' | 'size' | 'total-size' | 'deterministic'` | ||
| Type: `boolean` | `natural` | `named` | `size` | `total-size` | `deterministic` |
There was a problem hiding this comment.
Please remove Type: we don't use it across all pages
|
Updated |
| ## optimization.chunkIds | ||
|
|
||
| `boolean = false` `string: 'natural' | 'named' | 'size' | 'total-size' | 'deterministic'` | ||
| `boolean` | `natural` | `named` | `size` | `total-size` | `deterministic` |
There was a problem hiding this comment.
@alexander-akait @Raginipatel17 Shouldn't this instead be:
boolean: false string: 'natural' | 'named' | 'size' | 'total-size' | 'deterministic'
Although, I could see the argument for this instead:
false string: 'natural' | 'named' | 'size' | 'total-size' | 'deterministic'
Because:
trueis not a valid optionnatural(for example) is not a valid option - it should be a string:'natural'
There was a problem hiding this comment.
@caseyjhol you are right, do you want to send a fix?
There was a problem hiding this comment.
@caseyjhol Thanks for pointing that out! I missed this earlier.
@alexander-akait Let me know if you’d like me to fix it.
There was a problem hiding this comment.
Feel free to send a PR too
There was a problem hiding this comment.
I’ve created a PR to fix this issue. Please let me know if any changes are needed.
There was a problem hiding this comment.
Sorry I don't see your PR with fixes
There was a problem hiding this comment.
I've generated a new PR. It should be visible now: #8113
Ref: #6356 (related)
Summary
Improved the documentation of
optimization.chunkIdsby making type definitions clearer and presenting default values in a more readable way.What kind of change does this PR introduce?
Documentation update.
Did you add tests for your changes?
No
Does this PR introduce a breaking change?
No.
If relevant, what needs to be documented once your changes are merged, or what have you already documented?
The
optimization.chunkIdssection has been updated to improve clarity for users.Use of AI
Used AI assistance to help refine the wording.