File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed
Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -115,3 +115,32 @@ Global options:
115115### webpack 5
116116
117117Checkout [ ` OPTIONS.md ` ] ( https://github.com/webpack/webpack-cli/blob/master/OPTIONS.md ) to see list of all available options.
118+
119+ ## Exit codes and their meanings
120+
121+ | Exit Code | Description |
122+ | --------- | -------------------------------------------------- |
123+ | ` 0 ` | Success |
124+ | ` 1 ` | Errors from webpack |
125+ | ` 2 ` | Configuration/options problem or an internal error |
126+
127+ ## CLI Environment Variables
128+
129+ | Environment Variable | Description |
130+ | ----------------------------------- | ------------------------------------------------------------------- |
131+ | ` WEBPACK_CLI_SKIP_IMPORT_LOCAL ` | when ` true ` it will skip using the local instance of ` webpack-cli ` . |
132+ | ` WEBPACK_CLI_FORCE_LOAD_ESM_CONFIG ` | when ` true ` it will force load the ESM config. |
133+ | ` WEBPACK_PACKAGE ` | Use a custom webpack version in CLI. |
134+ | ` WEBPACK_CLI_HELP_WIDTH ` | Use custom width for help output. |
135+
136+ ## Configuration Environment Variables
137+
138+ You can use the following environment variables inside your webpack configuration:
139+
140+ | Environment Variable | Description |
141+ | -------------------- | -------------------------------------------- |
142+ | ` WEBPACK_SERVE ` | ` true ` if ` serve\|s ` is being used. |
143+ | ` WEBPACK_BUILD ` | ` true ` if ` build\|bundle\|b ` is being used. |
144+ | ` WEBPACK_WATCH ` | ` true ` if ` --watch\|watch\|w ` is being used. |
145+
146+ Checkout [ webpack.js.org] ( https://webpack.js.org/api/cli/ ) for more detailed documentation of ` webpack-cli ` .
You can’t perform that action at this time.
0 commit comments