Skip to content

Commit 696fed5

Browse files
legalcodesskipjack
authored andcommitted
docs(guides): fix grammar/punctuation in environment-variables.md (#1831)
1 parent 0874653 commit 696fed5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/content/guides/environment-variables.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,23 @@ contributors:
55
- simon04
66
- grisanu
77
- tbroadley
8+
- legalcodes
89
related:
910
- title: The Fine Art of the webpack 3 Config
1011
url: https://blog.flennik.com/the-fine-art-of-the-webpack-2-config-dc4d19d7f172#d60a
1112
---
1213

13-
To disambiguate in your `webpack.config.js` between [development](/guides/development) and [production builds](/guides/production), you may use environment variables.
14+
To disambiguate in your `webpack.config.js` between [development](/guides/development) and [production builds](/guides/production) you may use environment variables.
1415

15-
The webpack command line [environment option](/api/cli/#environment-options), `--env` allows you to pass in as many environment variables as you like. Environment variables will be made accessible in your `webpack.config.js`. For example, `--env.production` or `--env.NODE_ENV=local` (`NODE_ENV` is conventionally used to define the environment type, see [here](https://dzone.com/articles/what-you-should-know-about-node-env).)
16+
The webpack command line [environment option](/api/cli/#environment-options) `--env` allows you to pass in as many environment variables as you like. Environment variables will be made accessible in your `webpack.config.js`. For example, `--env.production` or `--env.NODE_ENV=local` (`NODE_ENV` is conventionally used to define the environment type, see [here](https://dzone.com/articles/what-you-should-know-about-node-env).)
1617

1718
```bash
1819
webpack --env.NODE_ENV=local --env.production --progress
1920
```
2021

2122
T> Setting up your `env` variable without assignment, `--env.production` sets `--env.production` to `true` by default. There are also other syntaxes that you can use. See the [webpack CLI](/api/cli/#environment-options) documentation for more information.
2223

23-
There is, however a change that you will have to make to your webpack config. Typically, in your webpack config `module.exports` points to the configuration object. To use the `env` variable, you must convert `module.exports` to a function:
24+
There is one change that you will have to make to your webpack config. Typically, `module.exports` points to the configuration object. To use the `env` variable, you must convert `module.exports` to a function:
2425

2526
__webpack.config.js__
2627

0 commit comments

Comments
 (0)