Skip to content
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

Merged
merged 8 commits into from
Jun 11, 2019

Conversation

EslamHiko
Copy link
Member

add docs for the feature in this pr: webpack/webpack-dev-server#1889

@netlify
Copy link

netlify bot commented May 17, 2019

Preview is ready

Built with commit 4446db1

https://deploy-preview-3051--webpackjsorg-netlify.netlify.com

Copy link
Contributor

@wizardofhogwarts wizardofhogwarts left a 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.
Copy link
Contributor

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.

Copy link
Member Author

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.

Copy link
Member

@EugeneHlushko EugeneHlushko left a 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

@@ -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`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`--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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
liveReload: true
liveReload: false

Usage via the CLI

```bash
webpack-dev-server --live-reload
Copy link
Member

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

@EslamHiko
Copy link
Member Author

@EugeneHlushko Done 😄.

@EslamHiko EslamHiko changed the title chore(docs): add documentation for liveReload option docs(devserver): add documentation for liveReload option Jun 6, 2019
@EugeneHlushko EugeneHlushko merged commit cb09057 into webpack:master Jun 11, 2019
@EugeneHlushko
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants