Skip to content

Commit

Permalink
docs(cli): add env var doc (#4773)
Browse files Browse the repository at this point in the history
* cli: add import local skip env doc

* fix: docs
  • Loading branch information
anshumanv committed Mar 28, 2021
1 parent 6f2e9ff commit 63ce3fe
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/content/api/cli.md
Expand Up @@ -521,11 +521,13 @@ NODE_OPTIONS="--max-old-space-size=4096 -r /path/to/preload/file.js" webpack

## Environment Variables

| Environment Variable | Description |
| -------------------- | -------------------------------------------- |
| `WEBPACK_SERVE` | `true` if `serve\|s` is being used. |
| `WEBPACK_BUILD` | `true` if `build\|bundle\|b` is being used. |
| `WEBPACK_WATCH` | `true` if `--watch\|watch\|w` is being used. |
| Environment Variable | Description | Available in `env` |
| ------------------------------- | ------------------------------------------------------------------- | ------------------ |
| `WEBPACK_SERVE` | `true` if `serve\|s` is being used. | yes |
| `WEBPACK_BUILD` | `true` if `build\|bundle\|b` is being used. | yes |
| `WEBPACK_WATCH` | `true` if `--watch\|watch\|w` is being used. | yes |
| `WEBPACK_PACKAGE` | Use a custom webpack version in CLI | no |
| `WEBPACK_CLI_SKIP_IMPORT_LOCAL` | when `true` it will skip using the local instance of `webpack-cli`. | no |

You can use the above environment variables inside your webpack configuration:

Expand Down

1 comment on commit 63ce3fe

@vercel
Copy link

@vercel vercel bot commented on 63ce3fe Mar 28, 2021

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.