Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
caseyjhol opened this issue Aug 26, 2022 · 1 comment · May be fixed by #6367

Comments

@caseyjhol
Copy link

caseyjhol commented Aug 26, 2022

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

If an option has the same default for all modes, we could simplify it like so:

optimization.mangleWasmImports

boolean

Default
false

Example:
image


This makes it easy to see at a glance what the defaults are for every option.

Related:
#2080, #2302

@chenxsan
Copy link
Member

I think it's a good idea. The results will be much intuitive.

@chenxsan chenxsan linked a pull request Aug 31, 2022 that will close this issue
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 a pull request may close this issue.

2 participants