-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
docs(devserver): add documentation for liveReload option #3051
Conversation
Preview is ready Built with commit 4446db1 https://deploy-preview-3051--webpackjsorg-netlify.netlify.com |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO this is fine, but the only thing is that never
appears to be a bit awkward in this context.
|
||
`boolean: true` | ||
|
||
When `devServer.liveReload` is disabled, the dev-server will never reload/refresh the page. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
never
appears to be a bit awkward.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wizardofhogwarts i updated the description with more detailed one, can you please check it ? thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since it is enabled by default, i suggest we rephrase it and correct grammar
src/content/api/cli.md
Outdated
@@ -299,6 +300,7 @@ Parameter | Explanation | Usage | |||
`--define` | Define any free variable, see [shimming](/guides/shimming) | `--define process.env.NODE_ENV="'development'"` | |||
`--hot` | Enables [Hot Module Replacement](/concepts/hot-module-replacement) | `--hot=true` | |||
`--labeled-modules` | Enables labeled modules [Uses LabeledModulesPlugin] | | |||
`--live-reload` | Enables page live reloading | `--live-reload=true` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
`--live-reload` | Enables page live reloading | `--live-reload=true` | |
`--live-reload` | Enables live reloading | `--live-reload=true` |
|
||
`boolean: true` | ||
|
||
When `devServer.liveReload` is enabled, the dev-server will reload/refresh the page when file changes if [`devServer.hot`](#devserverhot) option is disabled or [`devServer.watchContentBase`](#devserverwatchcontentbase) is enabled. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When `devServer.liveReload` is enabled, the dev-server will reload/refresh the page when file changes if [`devServer.hot`](#devserverhot) option is disabled or [`devServer.watchContentBase`](#devserverwatchcontentbase) is enabled. | |
By default, the dev-server will reload/refresh the page when file changes are detected. [`devServer.hot`](#devserverhot) option must be disabled or [`devServer.watchContentBase`](#devserverwatchcontentbase) option must be enabled in order for `liveReload` to take effect. Disable `devServer.liveReload` by setting it to `false`: |
module.exports = { | ||
//... | ||
devServer: { | ||
liveReload: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
liveReload: true | |
liveReload: false |
Usage via the CLI | ||
|
||
```bash | ||
webpack-dev-server --live-reload |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this default? Why we need to pass it
@EugeneHlushko Done 😄. |
Thanks! |
add docs for the feature in this pr: webpack/webpack-dev-server#1889