Skip to content

Commit

Permalink
docs(API): add missing config options to cli.md (#1880)
Browse files Browse the repository at this point in the history
This adds a table of config options for v4 to the API documentation.
  • Loading branch information
joshunger authored and TheDutchCoder committed Mar 6, 2018
1 parent a44fa0a commit 38faec2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
12 changes: 11 additions & 1 deletion src/content/api/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,16 @@ Invocation | Resulting environment

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

### Config Options

Parameter | Explanation | Input type | Default
------------------------- | ------------------------------------------- | ---------- | ------------------
`--config` | Path to the config file | string | webpack.config.js or webpackfile.js
`--config-register, -r` | Preload one or more modules before loading the webpack configuration | array |
`--config-name` | Name of the config to use | string |
`--env` | Environment passed to the config, when it is a function |
`--mode` | Mode to use, either "development" or "production" | string |

### Output Options

This set of options allows you to manipulate certain [output](/configuration/output) parameters of your build.
Expand Down Expand Up @@ -196,7 +206,7 @@ Parameter | Explanation | Input type | D
`--debug` | Switch loaders to debug mode | boolean | false
`--devtool` | Define [source map type](/configuration/devtool/) for the bundled resources | string | -
`--progress` | Print compilation progress in percentage | boolean | false

`--display-error-details` | Display details about errors | boolean | false

### Module Options

Expand Down
2 changes: 1 addition & 1 deletion src/content/api/loaders.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ __sync-loader-with-multiple-results.js__

``` js
module.exports = function(content, map, meta) {
this.callback(null, someSyncOperation(content), sourceMaps, meta);
this.callback(null, someSyncOperation(content), map, meta);
return; // always return undefined when calling callback()
};
```
Expand Down
2 changes: 2 additions & 0 deletions src/content/plugins/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ contributors:
- rouzbeh84
- aretecode
- eko3alpha
- refactorized
---

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

0 comments on commit 38faec2

Please sign in to comment.