Skip to content

Commit

Permalink
docs(api): add note about env usage (#6209)
Browse files Browse the repository at this point in the history
  • Loading branch information
snitin315 committed Jun 10, 2022
1 parent f9022fc commit a65a9be
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/content/api/cli.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,8 @@ The `--env` argument accepts multiple values:
| `npx webpack --env foo=bar=app` | `{ foo: "bar=app"}` |
| `npx webpack --env app.platform="staging" --env app.name="test"` | `{ app: { platform: "staging", name: "test" }` |

T> If you want to explicitly set a variable to empty string (`""`), you may need to escape characters on terminal like `npx webpack --env foo=\"\"`

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

In addition to the customized `env` showed above, there are some built-in ones under `env` to be used inside your webpack configuration:
Expand Down

1 comment on commit a65a9be

@vercel
Copy link

@vercel vercel bot commented on a65a9be Jun 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.