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 29, 2017
1 parent 44d7fb6 commit c63ba38
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 c63ba38

Please sign in to comment.