diff --git a/src/content/configuration/dev-server.md b/src/content/configuration/dev-server.md index 25e06a3dc958..6c6bfe0caf69 100644 --- a/src/content/configuration/dev-server.md +++ b/src/content/configuration/dev-server.md @@ -489,8 +489,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__ @@ -506,29 +505,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 ignore any update that would lead to a full page refresh and only applies updates that can cleanly integrated. ## `devServer.http2` @@ -1667,7 +1644,7 @@ module.exports = { }; ``` -T> It is possible to set any Node.js flags via `NODE_OPTIONS`, for example, to configure `HTTP_MAX_HEADER_SIZE`: +T> It is possible to set any Node.js flags via `NODE_OPTIONS`, for example, to configure `HTTP_MAX_HEADER_SIZE`: __package.json__