The current writer's guide suggests writing defaults as follows:
configuration.example.option
string = 'none': 'none' | 'development' | 'production'
Where = 'none' means that the default value is 'none' for the given option.
However, many options have 3 possible defaults depending on whether mode is set to none, production, or development. It's also difficult to decipher at times.
Proposal: use a "defaults" table instead.
optimization.moduleIds
boolean: false string: 'natural' | 'named' | 'deterministic' | 'size'
| Mode |
Default |
'production' |
'deterministic' |
'development' |
'named' |
'none' |
'natural' |
Example:

If an option has the same default for all modes, we could simplify it like so:
optimization.mangleWasmImports
boolean
Example:

This makes it easy to see at a glance what the defaults are for every option.
Related:
#2080, #2302