Skip to content

Commit 9c2fe1f

Browse files
committed
docs(mode) provide available options table
1 parent 7623de7 commit 9c2fe1f

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

src/content/concepts/mode.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ contributors:
77

88
Providing the `mode` configuration option tells webpack to use its built-in optimizations accordingly.
99

10-
`string` (development | production)
11-
10+
`string`
1211

1312
## Usage
1413

@@ -19,15 +18,23 @@ module.exports = {
1918
mode: 'production'
2019
};
2120
```
21+
2222

2323
or pass it as a cli argument:
2424

2525
```bash
2626
webpack --mode=production
2727
```
2828

29+
The following string values are supported:
30+
31+
Option | Description
32+
--------------------- | -----------------------
33+
`development` | Provides `process.env.NODE_ENV` with value `development`. Enables `NamedModulesPlugin`.
34+
`production` | Provides `process.env.NODE_ENV` with value `production`. Enables `UglifyJsPlugin`, `ModuleConcatenationPlugin` and `NoEmitOnErrorsPlugin`.
2935

30-
## Mode: development
36+
37+
### Mode: development
3138

3239

3340
```diff
@@ -41,7 +48,8 @@ module.exports = {
4148
}
4249
```
4350

44-
## Mode: production
51+
52+
### Mode: production
4553

4654

4755
```diff

0 commit comments

Comments
 (0)