Skip to content

docs: improve readability of optimization.chunkIds documentation#8068

Merged
alexander-akait merged 4 commits intowebpack:mainfrom
Raginipatel17:patch-1
Mar 21, 2026
Merged

docs: improve readability of optimization.chunkIds documentation#8068
alexander-akait merged 4 commits intowebpack:mainfrom
Raginipatel17:patch-1

Conversation

@Raginipatel17
Copy link
Copy Markdown
Contributor

Ref: #6356 (related)

Summary
Improved the documentation of optimization.chunkIds by 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.chunkIds section has been updated to improve clarity for users.

Use of AI
Used AI assistance to help refine the wording.

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
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 19, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
webpack-js-org Ready Ready Preview, Comment Mar 21, 2026 10:21am

Request Review

@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla bot commented Mar 19, 2026

CLA Signed

The committers listed above are authorized under a signed CLA.

## optimization.chunkIds

`boolean = false` `string: 'natural' | 'named' | 'size' | 'total-size' | 'deterministic'`
Type: boolean | string
Copy link
Copy Markdown
Member

@alexander-akait alexander-akait Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't change type, because string is wrong type here

Copy link
Copy Markdown
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix the problem

Fix incorrect `string` type for `optimization.chunkIds` and document allowed values explicitly.
@Raginipatel17
Copy link
Copy Markdown
Contributor Author

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`
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove Type: we don't use it across all pages

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@Raginipatel17
Copy link
Copy Markdown
Contributor Author

Updated

@alexander-akait alexander-akait merged commit 29288b2 into webpack:main Mar 21, 2026
9 checks passed
## optimization.chunkIds

`boolean = false` `string: 'natural' | 'named' | 'size' | 'total-size' | 'deterministic'`
`boolean` | `natural` | `named` | `size` | `total-size` | `deterministic`
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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:

  • true is not a valid option
  • natural (for example) is not a valid option - it should be a string: 'natural'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@caseyjhol you are right, do you want to send a fix?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@caseyjhol Thanks for pointing that out! I missed this earlier.
@alexander-akait Let me know if you’d like me to fix it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to send a PR too

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’ve created a PR to fix this issue. Please let me know if any changes are needed.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I don't see your PR with fixes

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've generated a new PR. It should be visible now: #8113

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants