Skip to content

fix(dev-server): remove hotOnly #3727

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 6 commits into from
Closed
Changes from 4 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
27 changes: 2 additions & 25 deletions src/content/configuration/dev-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -487,8 +487,7 @@ webpack-dev-server --host 0.0.0.0

## `devServer.hot`

`boolean`

`boolean = true` `string: 'only'`
Enable webpack's [Hot Module Replacement](/concepts/hot-module-replacement/) feature:

__webpack.config.js__
Expand All @@ -504,29 +503,7 @@ module.exports = {

T> Note that [`webpack.HotModuleReplacementPlugin`](/plugins/hot-module-replacement-plugin/) is required to fully enable HMR. If `webpack` or `webpack-dev-server` are launched with the `--hot` option, this plugin will be added automatically, so you may not need to add this to your `webpack.config.js`. See the [HMR concepts page](/concepts/hot-module-replacement/) for more information.


## `devServer.hotOnly`

`boolean`

Enables Hot Module Replacement (see [`devServer.hot`](#devserverhot)) without page refresh as a fallback in case of build failures.

__webpack.config.js__

```javascript
module.exports = {
//...
devServer: {
hotOnly: true
}
};
```

Usage via the CLI

```bash
webpack-dev-server --hot-only
```
When set to `'only'`, HMR will work without page refresh as a fallback when build errors.


## `devServer.http2`
Expand Down