Skip to content
24 changes: 24 additions & 0 deletions src/content/contribute/writers-guide.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,30 @@

### Configuration defaults and types


Check failure on line 158 in src/content/contribute/writers-guide.mdx

View workflow job for this annotation

GitHub Actions / Lint (ubuntu-latest, lts/*)

Delete `⏎`
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.
Comment thread
prithvisingh01-tech marked this conversation as resolved.
Outdated

#### Development mode defaults

- Optimized for debugging
- Includes useful warnings and error messages
- Output is more readable and not minified
Comment thread
prithvisingh01-tech marked this conversation as resolved.
Outdated
- Faster incremental builds

#### Production mode defaults

- Optimized for performance
- Output is minified and optimized
- Removes unnecessary code (e.g., dead code elimination)
Comment thread
prithvisingh01-tech marked this conversation as resolved.
Outdated
- Smaller bundle size

#### Example

```js
module.exports = {
mode: "development",
};

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:

**configuration.example.option**
Expand Down
Loading