Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions src/content/configuration/dev-server.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,71 @@ To disable:
npx webpack serve --no-client-progress
```

### reconnect

`boolean = true` `number`

<Badge text="v4.4.0+" />

Tells dev-server the number of times it should try to reconnect the client. When `true` it will try to reconnect unlimited times.

**webpack.config.js**

```javascript
module.exports = {
//...
devServer: {
client: {
reconnect: true,
},
},
};
```

Usage via the CLI:

```bash
npx webpack serve --client-reconnect
```

When set to `false` it will not try to reconnect.

```javascript
module.exports = {
//...
devServer: {
client: {
reconnect: false,
},
},
};
```

Usage via the CLI:

```bash
npx webpack serve --no-client-reconnect
```

You can also specify the exact number of times the client should try to reconnect.

```javascript
module.exports = {
//...
devServer: {
client: {
reconnect: 5,
},
},
};
```

Usage via the CLI:

```bash
npx webpack serve --client-reconnect 5
```

### webSocketTransport

`'ws' | 'sockjs'` `string`
Expand Down