Webpack-dev-server always triggering full page reload
See original GitHub issueHi, I integrated this plugin in a webpack-dev-server running in parallel to an expressjs server doing SSR. To get it working without always triggering a full page refresh i needed to add:
if (module.hot) {
module.hot.accept();
}
Do you have any Idea why? I would love to do a small PR to the Readme 😃
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
File updates causing full page reload #350 - GitHub
accept() , the full page reloads are no longer triggered, but the page is not re-rendered. (Even after tweaking the state, clicking around,...
Read more >Webpack-dev-server compiles files but does not refresh or ...
When enabled, file changes will trigger a full page reload. Example: module.exports = { //... devServer: { // ... watchContentBase: true } };....
Read more >Why webpack-dev-server Live-Reload Is Not Working - Medium
Modifying the shell html pages will not trigger a live-reload unless you configure webpack-dev-server with watchContentBase to watch where ...
Read more >A complete guide to full-stack live reload - LogRocket Blog
In this blog post, we will examine a variety of full-stack ... to pick up the latest code changes — each tiny code...
Read more >DevServer - webpack
Tell dev-server to watch the files served by the static.directory option. It is enabled by default, and file changes will trigger a full...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Glad that you fixed your issue! I’ve always wanted to get a simple custom SSR example in this repo but I never got to do it … Maybe I should do it some time soon.
Regarding your fixes though, I think point 1 is the most crucial - the production build does not have dev tools hook setup so Fast Refresh would essentially be no-op.
@pmmmwh Yep, that makes total sense. Thanks for explaining it that way. 👍