Skip to content

Commit

Permalink
docs(api): Add additional usage to --env webpack CLI docs
Browse files Browse the repository at this point in the history
  • Loading branch information
grisanu committed Aug 28, 2017
1 parent b853b12 commit bc4b23f
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions src/content/api/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,16 +130,17 @@ webpack --env.platform=web # sets env.platform == "web"

The `--env` argument accepts various syntaxes:

| Invocation | Resulting environment |
|-------------------------------|-----------------------------|
| webpack --env prod | `"prod"` |
| webpack --env.prod | `{ prod: true }` |
| webpack --env.prod=1 | `{ prod: 1 }` |
| webpack --env.prod=foo | `{ prod: "foo" }` |
| webpack --env.prod --env.min | `{ prod: true, min: true }` |
| webpack --env.prod --env min | `[{ prod: true }, "min"]` |

T> See this [environment variables](/guides/environment-variables) guide for more information.
| Invocation | Resulting environment |
|----------------------------------------|-----------------------------|
| webpack --env prod | `"prod"` |
| webpack --env.prod | `{ prod: true }` |
| webpack --env.prod=1 | `{ prod: 1 }` |
| webpack --env.prod=foo | `{ prod: "foo" }` |
| webpack --env.prod --env.min | `{ prod: true, min: true }` |
| webpack --env.prod --env min | `[{ prod: true }, "min"]` |
| webpack --env.prod=foo --env.prod=bar | `{prod: [ "foo", "bar" ]}` |

T> See this [environment variables](/guides/environment-variables) guide for more information on its usage.

### Output Options

Expand Down

0 comments on commit bc4b23f

Please sign in to comment.