Skip to content

Commit 38faec2

Browse files
joshungerTheDutchCoder
authored andcommitted
docs(API): add missing config options to cli.md (#1880)
This adds a table of config options for v4 to the API documentation.
1 parent a44fa0a commit 38faec2

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

src/content/api/cli.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,16 @@ Invocation | Resulting environment
141141

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

144+
### Config Options
145+
146+
Parameter | Explanation | Input type | Default
147+
------------------------- | ------------------------------------------- | ---------- | ------------------
148+
`--config` | Path to the config file | string | webpack.config.js or webpackfile.js
149+
`--config-register, -r` | Preload one or more modules before loading the webpack configuration | array |
150+
`--config-name` | Name of the config to use | string |
151+
`--env` | Environment passed to the config, when it is a function |
152+
`--mode` | Mode to use, either "development" or "production" | string |
153+
144154
### Output Options
145155

146156
This set of options allows you to manipulate certain [output](/configuration/output) parameters of your build.
@@ -196,7 +206,7 @@ Parameter | Explanation | Input type | D
196206
`--debug` | Switch loaders to debug mode | boolean | false
197207
`--devtool` | Define [source map type](/configuration/devtool/) for the bundled resources | string | -
198208
`--progress` | Print compilation progress in percentage | boolean | false
199-
209+
`--display-error-details` | Display details about errors | boolean | false
200210

201211
### Module Options
202212

src/content/api/loaders.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ __sync-loader-with-multiple-results.js__
3636

3737
``` js
3838
module.exports = function(content, map, meta) {
39-
this.callback(null, someSyncOperation(content), sourceMaps, meta);
39+
this.callback(null, someSyncOperation(content), map, meta);
4040
return; // always return undefined when calling callback()
4141
};
4242
```

src/content/plugins/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ contributors:
66
- rouzbeh84
77
- aretecode
88
- eko3alpha
9+
- refactorized
910
---
1011

1112
webpack has a rich plugin interface. Most of the features within webpack itself use this plugin interface. This makes webpack **flexible**.
@@ -18,6 +19,7 @@ Name | Description
1819
[`CommonsChunkPlugin`](/plugins/commons-chunk-plugin) | Extract common modules shared between chunks
1920
[`CompressionWebpackPlugin`](/plugins/compression-webpack-plugin) | Prepare compressed versions of assets to serve them with Content-Encoding
2021
[`ContextReplacementPlugin`](/plugins/context-replacement-plugin) | Override the inferred context of a `require` expression
22+
[`CopyWebpackPlugin`](/plugins/copy-webpack-plugin) | Copies individual files or entire directories to the build directory
2123
[`DefinePlugin`](/plugins/define-plugin) | Allow global constants configured at compile time
2224
[`DllPlugin`](/plugins/dll-plugin) | Split bundles in order to drastically improve build time
2325
[`EnvironmentPlugin`](/plugins/environment-plugin) | Shorthand for using the [`DefinePlugin`](./define-plugin) on `process.env` keys

0 commit comments

Comments
 (0)