Skip to content

Commit a1df789

Browse files
docs: improve explanation of configuration defaults for dev and prod modes
1 parent decb074 commit a1df789

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

src/content/contribute/writers-guide.mdx

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,31 @@ Please do not assume things are simple. Avoid words like 'just', 'simply'.
154154
```
155155

156156
### Configuration defaults and types
157+
158+
157159
Webpack configuration defaults can vary depending on the selected mode. The two most common modes are `development` and `production`, and each applies different default optimizations.
158160

161+
#### Development mode defaults
162+
163+
- Optimized for debugging
164+
- Includes useful warnings and error messages
165+
- Output is more readable and not minified
166+
- Faster incremental builds
167+
168+
#### Production mode defaults
169+
170+
- Optimized for performance
171+
- Output is minified and optimized
172+
- Removes unnecessary code (e.g., dead code elimination)
173+
- Smaller bundle size
174+
175+
#### Example
176+
177+
```js
178+
module.exports = {
179+
mode: "development",
180+
};
181+
159182
Always provide types and defaults to all of the documentation options in order to keep the documentation accessible and well-written. We are adding types and defaults after entitling the documented option:
160183

161184
**configuration.example.option**

0 commit comments

Comments
 (0)