-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Allow liveReload to be configurable in dev server #3154
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
Allow liveReload to be configurable in dev server #3154
Conversation
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.
Looks good except unsure about the contentHash
change
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.
Manually tested locally
For those who want to test this locally simply update
Update |
By default, liveReload for the `webpack_dev_server` config is the inverse of the hmr setting. There may be a usecase where one may want to control both values manually. This allows liveReload to be configurable through `webpacker.yml` via the `live_reload` option. If not set, then the default of the inverse of hmr is used. -- As an aside, this also fixes a deprication warning regarding the use of `[hash]` for the output file from the dev server. ``` [DEP_WEBPACK_TEMPLATE_PATH_PLUGIN_REPLACE_PATH_VARIABLES_HASH] DeprecationWarning: [hash] is now [fullhash] (also consider using [chunkhash] or [contenthash], see documentation for details) ```
Rebased with |
Anything else needs to be done to get this merged? |
Sounds good! |
What is the use case that you mention? |
Specifically, @PikachuEXE 🤷♂️ |
@justin808 more specifically, this comment from the PR when I duct taped webpack-dev-server 4 into webpacker |
Yup, that comment right there |
@t27duck @PikachuEXE, OK, I get it. If not HMR, then live reload may be on or off. But what is the point of having liveReload true if HMR is true? |
It allows "having liveReload true if HMR is true" doesn't mean it's meaningful |
By default, liveReload for the
webpack_dev_server
config is the inverse of the hmr setting. There may be a usecase where one may want to control both values manually.This allows liveReload to be configurable through
webpacker.yml
via thelive_reload
option. If not set, then the default of the inverse of hmr is used.