You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/concepts/mode.md
+12-4Lines changed: 12 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -7,8 +7,7 @@ contributors:
7
7
8
8
Providing the `mode` configuration option tells webpack to use its built-in optimizations accordingly.
9
9
10
-
`string` (development | production)
11
-
10
+
`string`
12
11
13
12
## Usage
14
13
@@ -19,15 +18,23 @@ module.exports = {
19
18
mode:'production'
20
19
};
21
20
```
21
+
22
22
23
23
or pass it as a cli argument:
24
24
25
25
```bash
26
26
webpack --mode=production
27
27
```
28
28
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`.
0 commit comments