-
-
Notifications
You must be signed in to change notification settings - Fork 95
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
fix: hmr: false
doesn't disable Hot Module Replacement
#392
Conversation
bb8ea3a
to
ec1d7a2
Compare
hmr: false
doesn't disable Hot Module Reloadinghmr: false
doesn't disable Hot Module Replacement
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.
Thanks for the PR. I just made some suggestions. What do you think about them?
@thedanbob can I get a link to the docs or source code of the '--no-hot' option? |
@justin808 Apart from that, all of the options in webpack CLI can be reverted by using |
@justin808 I just checked and this would work as well, and is perhaps cleaner: cmd += ["--hot", (@hot || false).to_s] if @hot != true Of course I'll have to adjust the tests to match. Probably making the default (in the tests) as |
I prefer a more visible code in more lines over one-liners. It is simpler to read, understand, and debug. |
73d7195
to
acf1709
Compare
How does this look? I went ahead and changed the tests to use |
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.
Thanks for the updates. I Shared my concerns in the comments.
* webpacker-dev-server >= 4 enables HMR by default, so explicitly disable when `hmr: false`
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 to me.
Thanks.
Thanks @thedanbob! |
Summary
webpacker-dev-server >= 4 enables HMR by default, so explicitly disable when
hmr: false
. Fixes #390Pull Request checklist
Update documentation