Skip to content

Commit a65a9be

Browse files
authored
docs(api): add note about env usage (webpack#6209)
1 parent f9022fc commit a65a9be

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/content/api/cli.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,8 @@ The `--env` argument accepts multiple values:
574574
| `npx webpack --env foo=bar=app` | `{ foo: "bar=app"}` |
575575
| `npx webpack --env app.platform="staging" --env app.name="test"` | `{ app: { platform: "staging", name: "test" }` |
576576

577+
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=\"\"`
578+
577579
T> See the [environment variables](/guides/environment-variables/) guide for more information on its usage.
578580

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

0 commit comments

Comments
 (0)