Skip to content

docs: standardize mode-specific defaults table across all configuration docs#8176

Open
shivxmsharma wants to merge 1 commit intowebpack:mainfrom
shivxmsharma:docs/mode-defaults-table
Open

docs: standardize mode-specific defaults table across all configuration docs#8176
shivxmsharma wants to merge 1 commit intowebpack:mainfrom
shivxmsharma:docs/mode-defaults-table

Conversation

@shivxmsharma
Copy link
Copy Markdown
Contributor

Closes #6356

Summary

Replaces all inline text descriptions of mode-specific configuration defaults with a standardized table format across the entire documentation. Supersedes #8175, which was closed because the changes were only applied partially.

Previously, mode-dependent defaults were described inconsistently using prose like "defaults to X in production mode and Y in development mode". This PR introduces a uniform table pattern and applies it globally — every configuration and plugin MDX file (65 total) was audited to ensure complete coverage.

19 options standardized across 7 files:

File Options Updated
optimization.mdx checkWasmTypes, concatenateModules, emitOnErrors, avoidEntryIife, flagIncludedChunks, innerGraph, mangleExports, minimize, nodeEnv, realContentHash, sideEffects, usedExports
output.mdx pathinfo
cache.mdx cache (top-level), allowCollectingMemory, maxMemoryGenerations
performance.mdx hints
module.mdx parser.json.exportsDepth
split-chunks-plugin.mdx minRemainingSize
writers-guide.mdx Documents the new table pattern as a standard

All default values were verified against webpack/lib/config/defaults.js.

What kind of change does this PR introduce?

docs

Did you add tests for your changes?

N/A — documentation-only change.

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?

This PR is the documentation update. The standardized table pattern has been added to the writer's guide (writers-guide.mdx) for future contributors to follow.

Use of AI

AI (Gemini) was used to assist with auditing all 65 MDX files for remaining instances of inline mode-specific defaults and to verify default values against the webpack source code. All changes were manually reviewed, implemented, and validated by me.

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 7, 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 Apr 8, 2026 4:02pm

Request Review

| --------------- | ------- |
| `'production'` | `false` |
| `'development'` | `true` |
| `'none'` | `false` |
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.

Let's use double quotes, we are using them inside all types and we can merge

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.

Pushed the changes with double quotes.

| --------------- | ---------- |
| `"production"` | `Infinity` |
| `"development"` | `1` |
| `"none"` | `1` |
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.

I think it should be Infinity for none

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.

Proposal: Update writer's guide for "Configuration defaults and types" to support listing different defaults for production/development

3 participants