Skip to content

Commit 825cc57

Browse files
authored
docs: add options table (#1047)
1 parent 5a6a3f0 commit 825cc57

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

README.md

+13-1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,18 @@ See [below](#other-servers) for an example of use with fastify.
5959

6060
## Options
6161

62+
| Name | Type | Default | Description |
63+
| :-----------------------------------------: | :-----------------------: | :-------------------------------------------: | :------------------------------------------------------------------------------------------------------------------- |
64+
| **[`methods`](#methods)** | `Array` | `[ 'GET', 'HEAD' ]` | Allows to pass the list of HTTP request methods accepted by the middleware |
65+
| **[`headers`](#headers)** | `Array\|Object\|Function` | `undefined` | Allows to pass custom HTTP headers on each request. |
66+
| **[`index`](#index)** | `Boolean\|String` | `index.html` | If `false` (but not `undefined`), the server will not respond to requests to the root URL. |
67+
| **[`mimeTypes`](#mimetypes)** | `Object` | `undefined` | Allows to register custom mime types or extension mappings. |
68+
| **[`publicPath`](#publicpath)** | `String` | `output.publicPath` (from a configuration) | The public path that the middleware is bound to. |
69+
| **[`stats`](#stats)** | `Boolean\|String\|Object` | `stats` (from a configuration) | Stats options object or preset name. |
70+
| **[`serverSideRender`](#serversiderender)** | `Boolean` | `undefined` | Instructs the module to enable or disable the server-side rendering mode. |
71+
| **[`writeToDisk`](#writetodisk)** | `Boolean\|Function` | `false` | Instructs the module to write files to the configured location on disk as specified in your `webpack` configuration. |
72+
| **[`outputFileSystem`](#outputfilesystem)** | `Object` | [`memfs`](https://github.com/streamich/memfs) | Set the default file system which will be used by webpack as primary destination of generated files. |
73+
6274
The middleware accepts an `options` Object. The following is a property reference for the Object.
6375

6476
### methods
@@ -136,7 +148,7 @@ webpackDevMiddleware(compiler, {
136148

137149
### index
138150

139-
Type: `Boolean|String`
151+
Type: `Boolean|String`
140152
Default: `index.html`
141153

142154
If `false` (but not `undefined`), the server will not respond to requests to the root URL.

0 commit comments

Comments
 (0)