Repository navigation
Commit 7ffa110
Einar Löve
Add option to silence warnings from environment plugin
If a process.env variable is is added to the EnvironmentPlugin but not defined, it is reported in the terminal as:
`WARNING in NODE_ENV environment variable is undefined.`
This pull request adds an option as the second argument to EnvironmentPlugin to silence the warnings.
Example:
```js
plugins: [
new webpack.EnvironmentPlugin([
'NODE_ENV',
], true),
],
```1 parent ba93f84 commit 7ffa110
1 file changed
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | | - | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
27 | | - | |
| 28 | + | |
28 | 29 | | |
0 commit comments